Module Configuration
Argument Checking Configuration
Most functions in μC/SMTPc include code to validate arguments that are passed to it. Specifically, μC/SMTPc checks to see if passed pointers are NULL, if arguments are within valid ranges, etc. The following constants configure additional argument checking.
Table - Argument Checking and Debug Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_ARG_CHK_EXT_EN | Allows code to be generated to check arguments for functions that can be called by the user and, for functions which are internal but receive arguments from an API that the user can call. | DEF_ENABLED or DEF_DISABLED |
Port Configuration
Table - Port Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_IPPORT | This value sets the default port to use when calling SMTPc_Connect() without specifying any particular port. The default value is 25 for standard connections. | Any value within the TCP/UDP port range. |
SMTPc_CFG_IPPORT_SECURE | This value sets the default port to use when calling SMTPc_Connect() without specifying any particular port. The default value is 465 for secure connections. | Any value within the TCP/UDP port range. |
Connection Configuration
Table - Connection Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_MAX_CONN_REQ_TIMEOUT_MS | This value set the maximum inactivity time in milliseconds for a Connect Request. | Any integer value |
SMTPc_CFG_MAX_CONN_CLOSE_TIMEOUT_MS | This value set the maximum inactivity time in milliseconds for a Connection Close Request. | Any integer value |
Feature Configuration
Table - Feature Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_AUTH_EN | This value configures whether the authentication mechanism is enabled or not. Note that the only mechanism implemented it the PLAIN one. | DEF_ENABLED or DEF_DISABLED |
Authentication Configuration
Table - Authentication Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_USERNAME_MAX_LEN | These values determine the maximum lengths for the username used by the authentication mechanism. | Any integer value |
SMTPc_CFG_PW_MAX_LEN | These values determine the maximum lengths for the password used by the authentication mechanism. | Any integer value |
Mail Configuration
Table - Mail Configuration
Constant | Description | Possible Values |
---|---|---|
SMTPc_CFG_MBOX_NAME_DISP_LEN | This value corresponds to the maximum length of the displayed same associated with a mailbox, including ‘\0’. | This length must be smaller than 600 in order to respect the Internet Message size limit (see RFC 2821 for more details on this limit). This length has a direct impact on the SMTPc_MBOX structure size, and as a rule of thumb, it should be as small as possible in order to preserve memory. |
SMTPc_CFG_MSG_SUBJECT_LEN | This value sets the maximum length of the string containing the mail subject, including ‘\0’. | This value must be smaller than 900, for the same reason cited above. |
SMTPc_CFG_MSG_MAX_TO | This value sets the maximum number of TO recipients. | Any integer value |
SMTPc_CFG_MSG_MAX_CC | This value sets the maximum number of CC recipients. | Any integer value |
SMTPc_CFG_MSG_MAX_BCC | This value sets the maximum number of BCC recipients. | Any integer value |
SMTPc_CFG_MSG_MAX_ATTACH | This value sets the maximum number of message attached. | Any integer value |