Skip to end of metadata
Go to start of metadata

 

FEATURE AVAILABILITY STARTING FROM RELEASE 1.12.5

Introduction

This job allows e-mails and their attachments arriving at an in-box to be automatically processed and to be used a basis for generating orders for further Job Chains. In addition, this job can also be used as a pre-processor for other automated mail and atachment processing.  

E-mail Processing Job

This Job carries out the following:

  1. Polls an e-mail inbox:
    • Polling is not recursive - sub-folders of the inbox are not polled.
    • Only unread e-mails are noted.
    • All e-mails processed are marked as being read.
  2. Writes e-mails found to files:
    • E-mails are marked as read (this cannot be changed).
    • E-mails are written as files to a directory.
      • Parameters:
        • copyMail2File=true
        • directory name
  3. Processes any e-mail attachments:
    • When an e-mail with an attachment is found:
      • The attachment is moved to a directory:
        • Parameters:
          • copyAttachmentsToFile=true
          • directory name
      • This directory can also be monitored with, for example, a File Order Source
  4. Generates an Order for another Job Chain (optional)
    • Parameters:
      • createOrder=true
      • the job chain name
    • Order parameters:
      • the file name
      • the subject of the mail
      • the sender
      • the mail received date
  5. The mail is post-processed (optional):
    • Prameters:
      • afterProcessEmail:
        • markAsRead
          • Default setting
        • delete
          • The mail is deleted
        • move
          • the mail is moved to another folder
            • Parameter:
              • the folder name

Example Job

Example Job  Expand source

Provision of E-mails as JavaScript Objects

JavaScript can be used to retrieve an e-mail as a JavaScript object once the mail has been saved as a file by the SOSMailProcessInBox job. The individual parts of the mail can then further automatically processed as required.

SOSEmailObject email = getEmailObject(var filename) -

  • String email.getSubject()
  • String email.getAttachmentFilename
  • String email.getReceipient
  • String email.getBody()
  • String email.getReturnAddress
  • String email.get
  • ....

Example Job Retrieving E-Mail Message

Here is an example job which retrieves an e-mail message file as a JavaScript object and logs individual properties of the message.

Example Job  Expand source

The ...