Structures of the SMTP Client. More...
Data Structures | |
struct | NET_SMTP_MAIL |
SMTP Email Descriptor. More... | |
struct | NET_SMTP_MTA |
SMTP Mail Transfer Agent Descriptor. More... | |
Structures of the SMTP Client.
struct NET_SMTP_MAIL |
SMTP Email Descriptor.
NET_SMTP_MAIL contains information about the email content.
From, To, Cc and Bcc
specify one or more email addresses. The address string may include optional friendly name. In this case the address name must be separated from friendly name and specified in angle brackets. Multiple addresses are separated by semicolons. Leading and trailing spaces are ignored in email address processing.
The value of NULL indicates unspecified option. For example the value of NULL for Bcc indicates no Blind carbon copies.
The following example specifies three To recipients (the last with no friendly name), no Cc and no Bcc:
Attachment
specifies one or more attachments to an email. The attachments are actually file names, specified in the attachment string. Multiple attachments are separated by semicolons. The value of NULL specifies no attachments. If the attachments are specified, the attachment support must also be enabled in the Configuration.
The following example adds three attachments:
Parameter for:
struct NET_SMTP_MTA |
SMTP Mail Transfer Agent Descriptor.
NET_SMTP_MTA contains information about the SMTP server or Mail Transfer Agent address and user credentials.
Address
specifies a fully qualified domain name or an IP address of SMTP server. If the Server is specified as FQDN (ie. "smtp.gmail.com"), the IP address is resolved internally.
The following example configures SMTP client for Gmail:
Flags
specifies additional options for SMTP client.
Currently only one option is defined:
Flags | Description |
---|---|
NET_SMTP_MTA_USETLS | Requires to use secure TLS mode (SMTPS must be enabled). |
0 | Selects non-secure mode. |
The value of 0 selects non-secure mode when SMTPS is not enabled. When SMTPS is enabled, the client automatically switches to secure mode, if SMTP server supports it (explicit TLS).
Parameter for: