|
| int | SSL_SendMail (IPADDR smtp_server, PCSTR userid, PCSTR pass, PCSTR from_addr, PCSTR to_addr, PCSTR subject, PCSTR textbody, BOOL STARTTLS=FALSE, int remotePort=-1, const char *serverName=nullptr, bool verifyPeer=false, SharkSslCAList caList=nullptr) |
| | Send an email message using SSL encryption. More...
|
| |
| int | SSL_SendMailHTML (IPADDR smtp_server, PCSTR userid, PCSTR pass, PCSTR from_addr, PCSTR to_addr, PCSTR subject, const char *filename, BOOL STARTTLS=FALSE, int remotePort=-1, const char *serverName=nullptr, bool verifyPeer=false, SharkSslCAList caList=nullptr) |
| | Send an HTML email message from a file using SSL encryption. More...
|
| |
| int | SSL_SendMailStartMIME (IPADDR smtp_server, PCSTR userid, PCSTR pass, PCSTR from_addr, PCSTR to_addr, PCSTR subject, BOOL STARTTLS=FALSE, int remotePort=-1, const char *serverName=nullptr, bool verifyPeer=false, SharkSslCAList caList=nullptr) |
| | Start a Multi-purpose Internet Mail Extension (MIME)session using SSL encryption. More...
|
| |
The following functions is very similar to the unencrypted SendMail() function. The initial connection of the SMTP server can happen in one of two ways:
1) An SSL connection is negotiated immediately. 2) A TCP connection is opened first, and a SSL connection is negotiated when the SMTP server sends a STARTTLS command to the NetBurner device.
Setting STARTTLS = TRUE enables the second mode of operation.
◆ SSL_SendMail()
| int SSL_SendMail |
( |
IPADDR |
smtp_server, |
|
|
PCSTR |
userid, |
|
|
PCSTR |
pass, |
|
|
PCSTR |
from_addr, |
|
|
PCSTR |
to_addr, |
|
|
PCSTR |
subject, |
|
|
PCSTR |
textbody, |
|
|
BOOL |
STARTTLS = FALSE, |
|
|
int |
remotePort = -1, |
|
|
const char * |
serverName = nullptr, |
|
|
bool |
verifyPeer = false, |
|
|
SharkSslCAList |
caList = nullptr |
|
) |
| |
Send an email message using SSL encryption.
- Parameters
-
| smtp_server | IP address of the SMTP server. |
| userid | AscII String to provide for RFC931 IDentification. |
| pass | AscII String to provide for AUTH IDentification. |
| from_addr | From email address. |
| to_addr | To email address. |
| subject | The email subject. |
| textbody | The email body. |
| STARTTLS | Enable/disable STARTTLS functionality. Default is disabled. |
| remotePort | Port number to connect to on the SMTP server. |
| serverName | Server name to use for certificate name verification and when sending SNI extensions. |
| verifyPeer | Should the client verify the server's certificate against a Certificate Authority list? |
| caList | The CA list associated with verifypeer. |
- Return values
-
| 0 | Send failed |
| 1 | Send was successful |
- See also
- SSL_SendMailHTML()
-
SSL_SendMailStartMIME()
-
SendMail()
◆ SSL_SendMailHTML()
| int SSL_SendMailHTML |
( |
IPADDR |
smtp_server, |
|
|
PCSTR |
userid, |
|
|
PCSTR |
pass, |
|
|
PCSTR |
from_addr, |
|
|
PCSTR |
to_addr, |
|
|
PCSTR |
subject, |
|
|
const char * |
filename, |
|
|
BOOL |
STARTTLS = FALSE, |
|
|
int |
remotePort = -1, |
|
|
const char * |
serverName = nullptr, |
|
|
bool |
verifyPeer = false, |
|
|
SharkSslCAList |
caList = nullptr |
|
) |
| |
Send an HTML email message from a file using SSL encryption.
- Parameters
-
| smtp_server | IP address of the SMTP server. |
| userid | AscII String to provide for RFC931 IDentification. |
| pass | AscII String to provide for AUTH IDentification. |
| from_addr | From email address. |
| to_addr | To email address. |
| subject | The email subject. |
| filename | HTTP server filename to send. |
| STARTTLS | Enable/disable STARTTLS functionality. Default is disabled. |
| remotePort | Port number to connect to on the SMTP server. |
| serverName | Server name to use for certificate name verification and when sending SNI extensions. |
| verifyPeer | Should the client verify the server's certificate against a Certificate Authority list? |
| caList | The CA list associated with verifypeer. |
- Return values
-
| 0 | Send failed |
| 1 | Send was successful |
- See also
- SSL_SendMail()
-
SSL_SendMailStartMIME()
-
SendMail()
◆ SSL_SendMailStartMIME()
| int SSL_SendMailStartMIME |
( |
IPADDR |
smtp_server, |
|
|
PCSTR |
userid, |
|
|
PCSTR |
pass, |
|
|
PCSTR |
from_addr, |
|
|
PCSTR |
to_addr, |
|
|
PCSTR |
subject, |
|
|
BOOL |
STARTTLS = FALSE, |
|
|
int |
remotePort = -1, |
|
|
const char * |
serverName = nullptr, |
|
|
bool |
verifyPeer = false, |
|
|
SharkSslCAList |
caList = nullptr |
|
) |
| |
Start a Multi-purpose Internet Mail Extension (MIME)session using SSL encryption.
Sending an E-Mail message with Multipurpose Internet Mail Extensions (MIME) is a multi step process:
The following MIME types are supported by default. The binary attachment should cover most types such as jpg, gif, etc. The types are defined by MIME Content Types.
- Parameters
-
| smtp_server | IP address of the SMTP server. |
| userid | AscII String to provide for RFC931 IDentification. |
| pass | AscII String to provide for AUTH IDentification. |
| from_addr | From email address. |
| to_addr | To email address. |
| subject | The email subject. |
| STARTTLS | Enable/disable STARTTLS functionality. Default is disabled. |
| remotePort | Port number to connect to on the SMTP server. |
| serverName | Server name to use for certificate name verification and when sending SNI extensions. |
| verifyPeer | Should the client verify the server's certificate against a Certificate Authority list? |
| caList | The CA list associated with verifypeer. |
- Return values
-
| 0 | Send failed |
| 1 | Send was successful |
- See also
- SendMailAuthStartMIME()
-
SendMailAuthAddMIME()
-
SendMailAuthEndMIME()