Open User Communication
6.11 Secure Open User Communication
Communication
Function Manual, 12/2017, A5E03735815-AF
109
You use the "Remote Port" setting in the data types at the block parameter
"MAIL_ADDR_PARAM" to define which process is used for the communication.
Table 6- 6 Port numbers for the SMTPS and STARTTLS processes
1
STARTTLS Any (≠465)
2
The instruction TMAIL_C uses SMTPS only for Port 465. For all other ports STARTTLS is used.
According to RFC, mail servers use Ports 25 and 587 for secure connections with STARTTLS. The
use of other port numbers for SMTP is not RFC-compliant, successful communication with such a
mail server is not guaranteed.
Example: Setting up a secure connection to a mail server over IPv4
The following section describes how to set up a secure connection to an IPv4 mail server
with the TMAIL_C communication instruction.
To set up a secure connection via the IP4 address of the mail server, follow these steps:
1. Create a global data block in the project tree.
2. Define a tag of the data type TMAIL_V4_SEC in the global data block.
The example below shows the global data block "MailConnDB" in which the tag
"MailConnectionSEC" of the data type TMAIL_V4_SEC is defined.
Figure 6-26 Data type TMAIL_V4_SEC