Class CurlEmailSender

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

Class Documentation

class CurlEmailSender : public email::EmailSender, public email::CurlExecutor

Email sending wrapper for curl.

Sets the options and executes commands to send emails with curl.

Public Functions

explicit CurlEmailSender(UserInfo::SharedPtrConst user_info, EmailRecipients::SharedPtrConst recipients, const bool curl_verbose)

Constructor.

Parameters:
  • user_info – the user information for sending emails

  • recipients – the email recipients

  • curl_verbose – the curl verbose status

virtual ~CurlEmailSender()
virtual bool send(const struct EmailContent &content, std::optional<EmailHeaders> additional_headers = std::nullopt)

Send an email.

Parameters:
  • content – the content

  • additional_headers – the optional additional headers to include in the email

Returns:

true if successful, false otherwise

virtual bool reply(const struct EmailContent &content, const struct EmailData &email, std::optional<EmailHeaders> additional_headers = std::nullopt)

Reply to an email.

Parameters:
  • content – the content

  • email – the email to reply to

  • additional_headers – the optional additional headers to include in the email

Returns:

true if successful, false otherwise

Protected Functions

virtual bool init_options()

Initialize concrete options.

Inheriting classes should implement this and initialize options specific to them.

Returns:

true if success, false otherwise