MAIL_RECEIVE

LANSA Composer

MAIL_RECEIVE

This Activity will retrieve a single email message from the mail server using LANSA Integrator's POP3MailService. It will retrieve the first email message for a particular user. The user details and other criteria must be specified in a POP3 Mail Configuration.

Information about the email, the mail text and attachments will be output.

If the "Remove from server after read" is set to Yes on the POP3 Mail Configuration, then the next execution of this Activity will retrieve the next email message.

An email Event notification named POP3FAILED is available in this Activity. If this event is active and a failure occurs in this Activity, then a notification email will be sent. Refer to Event Maintenance for setting up Event notifications.

INPUT Parameters:

POP3CONFIG : Required

This parameter must contain the name of a POP3 Mail Configuration. This Configuration can be created and maintained using the POP3 Mail Configuration option in the Navigator.

If this parameter is not provided or is not found, this Activity will return an error and processing will be abandoned.

SAVEDIRECTORY : Optional

This parameter may be used if the POP3 Configuration requires mail text or attachments to be saved. If it contains a non-blank value it will be used as the directory into which the email message text and attachments will be saved.

If this parameter is not provided, and text or attachments are to be saved, then the directory from the POP3 Configuration will be used.

OUTPUT Parameters:

POP3COUNT

Upon completion, this value will contain a count of the email messages received.  Because this activity receives a maximum of one message, this value will be either zero or one.

FROMADDRESS

This value will contain the from address from the retrieved email message.

SUBJECT

This value will contain the Subject from the received email message.

SENTDATE

This value will contain the date on which the received email message was sent.

ATTACHMENTNO

This will contain the number of attachments on the received email message.

TEXTFILE

If the POP3 Configuration requires the email text to be saved, then this value will contain the path and file name of the email text which has been saved.

For example:   Windows    c:\messages\mailtext.txt

IBM i     /email/mailtext.txt

ATTACHMENTLIST

If the POP3 Configuration requires the email attachments to be saved, this will contain a list of full path and file name which have been saved from the received email.
The attachments will be saved in the directory specified in the POP3 Mail Configuration or the input parameter SAVEDIRECTORY.