User`s guide

553
If this field is present in the header, the unit will insert the current date and time into the
header. The date and time are values local to the unit and do not contain any time zone
information.
Body Section
The body section may include any text. This text is parsed for any function calls that may be
present. Function calls must be enclosed between “<%” and “%>”. These sequences are
substituted by text resulting from the function call. The following functions may be used:
Function
Description
TimeSmtp(); Inserts the unit’s date and time.
serial_number(); Inserts the unit’s serial number
Smtpip(); Inserts the IP address of the unit as seen by the SMTP server
during transmission
email_event() Inserts a formatted description of the event that caused the
email transmission.
Smtpid() Inserts the unit ID for this device as configured by the “Router
Identity” field in the Configuration - System > Device Identity
web page, or the cmd 0 unitid CLI command.
pppip(“instance”); Inserts the IP address for a specific PPP instance, where
instance is the PPP instance number.
The following are examples of email templates.
1)
TO: 123@abc.co.nz
FROM: MyRouter
SUBJECT: Remote Configuration
This blank line is required
Time: <%timeSmtp();%>
Serial Number: <%serial_number();%>
Req: CFG_RQ
IP Address: <%smtpip();%>
PPP 1 IP address: <%pppip("1");%>
2)
TO: fred@anyco.com, jane@anyco.co.uk
FROM: MyRouter
SUBJECT: automatic email
MIME-Version: 1.0
This blank line is required
Unit: <%smtpid();%>
Event: <%email_event();%>
This event had sufficient priority to cause the transmission of this
email. Please check the attached logs and review.
CLI commands can also be executed and the output from up to 10 CLI commands will be
added to the body of the email. The command to be executed needs to be entered in place
of xxxxx below. To include the output from multiple commands, use the run_cmd() function
multiple times.
<%run_cmd("xxxxx");%>