FP | 6.1 Email Functions of the FP |
|
|
With the [Spin] buttons (arrow up/ down) you can choose among the 4 input fields for the email text input.
A predefined text can be selected by using the numbers 0 to 3 in the PLC program (see page 61).
Optionally a PLC data file attachment (see page 59) can be defined in the email text.
6.1.2 Predefined Email Texts in the FP Web-Server
Up to 4 email texts (0 to 3) can be predefined in the FP
Alternatively the email text can be read from the PLC's memory (see "Email text string in the PLC memory").
The first lines of the email text can be used for special keywords (see RFC 822 regulation):
SUBJECT | any subject |
TO | any name |
FROM | any name |
To automatically insert keywords, please refer to "Automatic TO/FROM tag insertion".
Then an email text of up to 31950 characters (almost 32kB) may follow. Also the same quantity of characters is allowed when reading email from the PLC.
Comment:
For email text, use only
The email texts are saved in ASCII text files as "mail_x.txt" in the Configurator project, where _x stands for a number from 0 to 3. If it is absolutely necessary to edit these files outside the configurator using a text editor (Notepad, EditPad...). Do not work with a word processing system, such as WinWord!
e.g.: The file mail_0.txt from the configurator project may look like the following:
SUBJECT: Email Alert
Hello PLC user,
This is an email alert from your
PLC. Service required.
6.1.2.1 PLC Data Attached to an Email
It is possible to generate an email with an attached file holding PLC data. The PLC data can be sent as a text (TXT) or MS Excel (CSV) compatible file format. The PLC register range to be read and sent with the attachment and the file name can be defined in a special tag. This tag is placed in the email text directly after the statements "SUBJECT" and "TO", i.e. in a separate text line directly before the email text starts. The email text can be predefined (stored in the FP
The format of the special tag for a CSV attachment is:
{A_D_00200_00066_S04_filename.csv}
59