Configuring for timezone – AMX i!-EquipmentMonitor User Manual

Page 10

Advertising
background image

Running i!-EquipmentMonitor

6

i!-EquipmentMonitor

You can use the following code to loop through the downloaded emails whenever new email

arrives:

DATA_EVENT[dvPop3Socket]

{

OFFLINE:

{

STACK_VAR

INTEGER nLoop

Integer nLoop1

For (nLoop=1;nLoop<=nPop3QtyMail;nLoop++)

{

SEND_STRING 0,'i!Email Test-Print Message'

SEND_STRING 0,' '

SEND_STRING 0,"'Message #',Itoa(nLoop)"

SEND_STRING 0,"'Date:',sPop3EmailMessage[nLoop].cDate"

SEND_STRING 0,"'From: "',sPop3EmailMessage[nLoop].cFromPersonal,

'" <',sPop3EmailMessage[nLoop].cFrom,'>'"

SEND_STRING 0,"'To: "',sPop3EmailMessage[nLoop].cToPersonal,

'" <',sPop3EmailMessage[nLoop].cTo,'>'"

SEND_STRING 0,"'Subject:',sPop3EmailMessage[nLoop].cSubject"

SEND_STRING 0,"'Message:',sPop3EmailMessage[nLoop].cMessage"

SEND_STRING
0,"'Attachments:',Itoa(sPop3EmailMessage[nLoop].nAttachCount)"

For (nLoop1=1;nLoop1<=sPop3EmailMessage[nLoop].nAttachCount;nLoop1++)

SEND_STRING 0,"'Attachment ',Itoa(nLoop1),':',


sPop3EmailMessage[nLoop].cAttachments[nLoop1]"

SEND_STRING 0,' '

}

}

}

Once the emails are processed, you can delete any emails you like by calling

Pop3ClearEmailMessage ()

or

Pop3ClearAllEmailMessages ()

.

Pop3ClearEmailMessage

allows you to delete one email at a time;

Pop3ClearAllEmailMessages ()

allows you to delete all the emails at once.

Configuring for Timezone

The i!-EquipmentMonitorOut.axi file can read the time zone information from i!-TimeManager and

includes this information in email and notifications. Simply include the i!-TimeManager moodule

and make sure to name the i!-TimeManager virtual device '

vdvTmEvents

'. The file

'i!-EquipmentMonitorTest with i!-TimeManager.axs' provides an example of using these two

applications together.

Using i!-TimeManager is recommended for use with i!-EquipmentMonitor since some email

clients may improperly display the time when the email or notification was sent. i!-TimeManager

provides i!-EquipmentMonitor with a universal time reference, including any Daylight Savings

time offsets, and includes this information in the email or notification.

The i!-TimeManager Module is not included with i!-EquipmentMonitor. To obtain the
i!-TimeManager Module (i!-TimeManager.tko), please download the i!-TimeManager
install from our web site.

Advertising