AMX i!-EquipmentMonitor instruction manual Configuring for Timezone, DATAEVENTdvPop3Socket

Page 10

Running 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.

 

6

i!-EquipmentMonitor

 

 

 

Image 10
Contents EquipmentMonitor Software Limited Agreement Table of Contents Table of Contents Supported Operating Systems Minimum PC RequirementsInstalling i!-EquipmentMonitor #INCLUDE i!-EquipmentMonitorOut.axi Sending EmailDvSmtpSocket = This is the body of my email! Wow, this is Cool Receiving EmailBUTTONEVENTdvTP,1 #INCLUDE i!-EquipmentMonitorIn.axiSeconds and should I delete? Pop3SetServer mail.mydomain.comPop3SetRefresh300,1 BUTTONEVENTdvPanel,6DATAEVENTdvPop3Socket Configuring for TimezoneSPop3EmailMessagenLoop.cAttachmentsnLoop1 EquipmentMonitorOut.axi Constants EquipmentMonitorOut.axiDvSmtpSocket EquipmentMonitorOut.axi Functions SmtpQueMessageSetCHAR Offset SmtpSetTimeOffSmtpSetServer EncrBase64Encode ConfigNotifySmtpSetUser SendNotifyEquipmentMonitorIn.axi EquipmentMonitorIn.axi ConstantsEquipmentMonitorIn.axi Functions Pop3SetServer Pop3SetRefreshPop3SetUser AMX reserves