30 Rockwell Automation Publication 1783-UM001B-EN-P - May 2010
Chapter 2 Network Services Setup
7. Open your routine window (for example, MainRoutine) and insert an
MSG instruction.
8. Select the SendEmail MESSAGE tag.
9. Double-click the MSG block and choose source (EMS_EMAIL) and
destination (EmailDstStr) tags.
In our example, we have GetAttributeValue and SetAttributeValue tags and
GetAttribute/SetAttribute MESSAGE tags for individual attribute
handling.
Message sending is triggered by the trigger_send BOOL tag. The message
is sent when you press Ctrl+T in the rung or set the tag value to 1.
The figure shows an example of a program that sends an email when any
unauthorized MAC is detected by the 1783-EMS switch.
Enter the Text of the Email Message
Use the string browser to enter the text of the email. In the example, you enter the
email text into the EWEB_EMAIL tag. To include To:, From:, and Subject: fields
in the email, use <CR><LF> symbols to separate each of these fields. The To:
and From fields are required; the Subject: field is optional. Use a second set of
<CR><LF> symbols after the last one of these fields you enter.
EXAMPLE
To: email address of recipient $r$l
From: email address of sender$r$l
Subject: subject of message $r$l$r$l
body of email message