TeleService communication (SMTP email)
14.1 TM_Mail (Send email) instruction
Table 14- 2
Interaction of the Done, Busy and Error parameters
DONE
BUSY
Irrelevant
1
1
0
0
0
0
0
If the CPU is changed to STOP mode while TM_MAIL is active, then the communication
connection to the email server is terminated. The communication connection to the email
server is also lost if problems occur in CPU communication on the Industrial Ethernet bus. In
these cases, the send process is suspended and the email does not reach the recipient.
NOTICE
Modifying user programs
Deletion and replacement of program blocks, the calls to TM_MAIL, or calls to the instance
DBs of TM_MAIL can break the linking of program blocks. If you fail to maintain linked
program blocks, then the TPC/IP communication functions can enter an undefined state,
possibly resulting in property damage. After transferring a modified program block, you
would have to perform a CPU restart (warm) or cold start.
To avoid breaking the linking of program blocks, only change the parts of your user
program that directly affect the TM_MAIL calls in the following cases:
• The CPU in the STOP mode
• No email is sent (REQ and BUSY = 0)
Data consistency
The input parameter ADDR_MAIL_SERVER is read when the operation is started. A new
value does not take effect until the current operation is complete and a new TM_MAIL
operation is initiated.
In contrast, the parameters WATCH_DOG_TIME, TO_S, CC, FROM, SUBJECT, TEXT,
ATTACHMENT, USERNAME and PASSWORD are read during the execution of TM_MAIL
and may be changed only when the job is finished (BUSY = 0)
1302
ERROR
Description
Irrelevant
Job is in progress.
0
The job was completed successfully.
1
The job was terminated with an error. For the cause of the error, refer to the
STATUS parameter.
0
No job in progress
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK