RetrievePOP3


 

RetrievePOP3>server,username,password,output_path

 

Not supported in Macro Scheduler Lite.

 

Retrieves mail from a POP3 server and stores new mail messages in the folder specified in output_path.

 

server: the name/address of the POP3 server

username: the POP3 account username

password: the POP3 account password

output_path: a local directory where message files should be stored

 

Unencoded messages and headers are stored as MSGn.TXT where n is an incremented suffix number.  e.g. MSG1.TXT, MSG2.TXT etc.  Text body parts will be stored as MSGn_BODYn.TXT and attachments will be stored as MSGn_attachment_filename

 

The command returns two variables:

 

POP3_MSGFILES: A semicolon delimited list of files downloaded.  Use Separate to explode and retrieve file count.

POP3_RESULT: Contains the last response, such as errors, returned by the server.

 

Optional variables are:

 

POP3_STATUS: Set to 0 to suppress the status window.  Default is 1.

POP3_PORT: The POP3 port number.  Default is 110.

POP3_TIMEOUT: Timeout in seconds.  Default is 5.

POP3_DELETE: Set to 1 to delete messages from the server after downloading. Default is 0.

POP3_MSGSIZELIMIT: Size limit in Kb.  Messages over this limit will not be downloaded.  Default is 0 (no size limit).

POP3_SSL: Set to 1 to use SSL for secure connections.  To use SSL you will first need to install the OpenSSL libraries.  See:

http://www.openssl.org/related/binaries.html and http://www.mjtnet.com/blog/2012/10/03/sendingretrieving-emails-via-gmail/

 

To set TLS version set TLS_VER to one of the following values:

 

1        TLS v1.0

11        TLS v1.1

12        TLS v1.2

 

Abbreviation: RET

See also: SMTPSendMail

 

Example

 

Let>POP3_STATUS=1

Let>POP3_MSGSIZELIMIT=3

Let>POP3_TIMEOUT=5

RetrievePOP3>mail.server.com,username1,password,d:\emailfiles

MessageModal>POP3_RESULT

Separate>POP3_MSGFILES,;,MsgFiles

MessageModal>Files Downloaded: %MsgFiles_count%%CRLF%File List: %POP3_MSGFILES%