Teleservice communication (SMTP email)
13.1 TM_Mail (Send email) instruction
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
777
SUBJECT IN String Subject name of the email: STRING data with a maximum
TEXT IN String Text message of the email (optional): STRING data with a
maximum length of 240 characters.
If this parameter is an empty string, then the email will be
sent without message text.
ATTACHMENT IN Variant Pointer to email attachment data: Byte, word, or double
word data with a maximum length of 65534 bytes.
If no value is assigned, then the email sent without an
DONE OUT Bool
• 0 - Job not yet started or still executing.
• 1 - Job was executed error-free.
BUSY OUT Bool
• 0 - No operation in progress
• 1- Operation in progress
ERROR OUT Bool The ERROR bit =1 for one scan, after the last request was
terminated with an error. The error code value at the
STATUS output is valid only during the single scan where
STATUS OUT Word Return value or error information of the TM_MAIL
ADDR_MAIL_SERVER
1
Static DWord IP address of the mail server: You must assign each IP
address fragment as an octet of two 4-bit hexadecimal
characters. If the IP address fragment = decimal value 10
which equals hexadecimal value A, then you must enter
"0A" for that octet.
For example: IP address = 192.168.0.10
ADDR_MAIL_SERVER = DW#16#C0A8000A, where:
• 192 = 16#C0,
• 168 =16#A8
• 0 = 16#00
• 10 = 16#0A
WATCH_DOG_TIME
1
Static Time The maximum time allowed for TM_MAIL to complete the
entire SMTP process, from the initiation of the conneciton to
the SMTP to the end of the SMTP transmission. If this time
is exceeded, then TM_MAIL execution ends with an error.
The actual time delay until TM_MAIL ends and the error is
issued may exceed the WATCH_DOG_TIME, because of
the additional time required for the disconnect operation.
At first you should set a time of 2 minutes. This time can be
much smaller for an ISDN phone connection.
USERNAME
1
Static String Mail account user name: STRING data with a maximum
PASSWORD
1
Static String Mail server password: STRING data with a maximum length