MAIL_RECEIVEALL

LANSA Composer

MAIL_RECEIVEALL

This Activity will retrieve multiple email messages for a user from the mail server using LANSA Integrator's POP3MailService.

Information about the email, the mail text and attachments from the retrieved emails will be saved to a local directory. A directory will be created for each email retrieved. A list of the directories created will be output by this Activity.

The parent directory for these created directories may be specified in the POP3 Mail Configuration or in the input parameter SAVEDIRECTORY.

Activities that populate list variables are often followed by a LOOP processing sequence directive or other constructs to process the contents of the list.  Refer to Variables and Lists for more information about the use of list variables.

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

If this parameter contains a non-blank value it will be used as the home directory into which the sub directory to contain the email details is created. The details of the email message, the message text and attachments will be saved into this sub directory. If this parameter is not provided, then the directory from the POP3 Configuration will be used.

POP3MAX : Optional

If this parameter contains a number, it will be used as the maximum number of emails that this activity will retrieve. A special value of *NOMAX can be used to indicate that there be no maximum. In this case, all emails that have not been deleted will be retrieved.  If this parameter is not provided, then a default limit of 50 will be used.

OUTPUT Parameters:

POP3COUNT

Upon completion, this value will contain a count of the email messages received.  The value may be zero if no mail was available to receive.

STOREDIRECTORY

Specifies the name of a list variable that will contain a list of sub directories which have been created within the SAVEDIRECTORY.
The full path will be held.

For example:   Windows     \savedir\subdir

IBM i    /savedir/subdir

The name of the sub-directory will be generated from the system setting POP3 save sub-directory name prefix plus a unique number. For example :  MS123

This sub-directory will contain:

  • Mail attachments (if required to be saved)
  • Mail text (if required to be saved) as file named mailtext.txt
  • Mail information in file named mailinfo.txt
    Format of this mailinfo.txt is:
     
    # Created by DXACTP302 on 20060216 11:32:00

    FROMADDRESS=xxxxxxxxxxxxxxxxx

    SUBJECT=zzzzzzzzzzzz

    SENTDATE=dddddddddd

    #