axl_bool myqttd_support_smtp_send ( MyQttdCtx ctx,
const char *  mail_from,
const char *  mail_to,
const char *  subject,
const char *  body,
const char *  body_file,
const char *  smtp_server,
const char *  smtp_port 
)

Allows to send a mail message through the provided smtp server and port, with the provided content.

Parameters
ctxThe context where the operation will take place.
mail_fromThe mail from value to configure on this mail message. If NULL is provided, "myqttd@localdomain.local" will be used.
mail_toThe destination address value to configure on this mail message. This value is not optional and must be defined and pointing to a right account.
subjectThe message subject to be configured. This value is optional, if not configured no subject will be placed.
bodyThe message body to be configured. This value is optional, if not configured no subject will be placed.
body_fileOptional reference to a file that contains the body of the message.
smtp_serverThe location of the smtp server. If NULL is passed, localhost will be used.
smtp_portThe port location of the smtp server. If NULL is passed, 25 will be used.
Returns
axl_true in the case the mail message was successfully sent otherwise axl_false is returned.

References error, msg, myqtt_conn_sock_connect(), and MYQTTD_MYQTT_CTX.

Referenced by myqttd_support_simple_smtp_send().