|
NetBurner 3.5.6
PDF Version |
Functions | |
| 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, const unsigned char *certBuff=nullptr, uint32_t certBuffSize=0, uint16_t certBuffFormat=SSL_FILETYPE_PEM) |
| Send an email message using SSL encryption. | |
| 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, const unsigned char *certBuff=nullptr, uint32_t certBuffSize=0, uint16_t certBuffFormat=SSL_FILETYPE_PEM) |
| Send an HTML email message from a file using SSL encryption. | |
| 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, const unsigned char *certBuff=nullptr, uint32_t certBuffSize=0, uint16_t certBuffFormat=SSL_FILETYPE_PEM) |
| Start a Multi-purpose Internet Mail Extension (MIME)session using SSL encryption. | |
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.
| 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, | ||
| const unsigned char * | certBuff = nullptr, | ||
| uint32_t | certBuffSize = 0, | ||
| uint16_t | certBuffFormat = SSL_FILETYPE_PEM ) |
#include <ssl_mailto.h>
Send an email message using SSL encryption.
| 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 common name to use for certificate name verification and when sending SNI extensions. |
| verifyPeer | Set true to verify the server's certificate against a Certificate Authority list. Default if false. |
| certBuff | Buffer containing the certificate data.Default is null. |
| certBuffSize | Size of the buffer containing the certificate data. |
| certBuffFormat | The format of the certificate buffer. Default is SSL_FILETYPE_PEM. |
| 0 | Send failed |
| 1 | Send was successful |
| 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, | ||
| const unsigned char * | certBuff = nullptr, | ||
| uint32_t | certBuffSize = 0, | ||
| uint16_t | certBuffFormat = SSL_FILETYPE_PEM ) |
#include <ssl_mailto.h>
Send an HTML email message from a file using SSL encryption.
| 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. |
| certBuff | Buffer containing the certificate data. Default is null. |
| certBuffSize | Size of the buffer containing the certificate data. |
| certBuffFormat | The format of the certificate buffer. Default is SSL_FILETYPE_PEM. |
| 0 | Send failed |
| 1 | Send was successful |
| 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, | ||
| const unsigned char * | certBuff = nullptr, | ||
| uint32_t | certBuffSize = 0, | ||
| uint16_t | certBuffFormat = SSL_FILETYPE_PEM ) |
#include <ssl_mailto.h>
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.
| 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 | Set true to verify the server's certificate against a Certificate Authority list. Default if false. |
| certBuff | Buffer containing the certificate data. Default is null. |
| certBuffSize | Size of the buffer containing the certificate data. |
| certBuffFormat | The format of the certificate buffer. |
| 0 | Send failed |
| 1 | Send was successful |