Running
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
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
Using
The
| 6 | |
|
|
|