Polling of mail servers for email messages

Using email listener definitions, the email Listeners application uses a dedicated cron task to poll the mail server for incoming messages. Cron tasks are Java™ components that you can set to run automatically and on a fixed schedule. For each email listener definition that you create, a specific instance of the cron task is created and associated with the email listener.

The scheduling value determines the polling frequency. The polling frequency is stored as an attribute of each cron task instance. Specify different schedules for different email accounts. By default, the schedule for the polling frequency is set to every 5 minutes.

The cron task polls the mail server at the set frequency and performs the following actions:
Table 1. Cron task actions
Condition Mail server action
For new email messages on the mail server

The mail server:

  • Extracts the header and message body
  • Extracts any attachments
  • Moves the email to e-mail staging
  • Marks the email message as read
For email messages marked as read on the mail server

The mail server determines whether read email messages are deleted:

  • If an email message is to be deleted, it marks the email message as deleted
  • If an email message is not to be deleted, it keeps the email message on the server

For email messages processed from a POP-based mail account, the Email Listener determines whether an email is already processed or is new.