How to: Configure RetrieveEmailsJob

The RetrieveEmailsJob is capable of reading from a POP3 / O365 email account, retrieving data from individual emails messages and deleting email messages. Data retrieved by this JobType is written to the MessageInbound table for processing by other JobTypes. This job type is typically used in conjunction with another Import job class.

JobType Definitions

JobIdGroup JobTypeDescriptionSubscriptions SupportedEndpoints SupportedDefault StateNotes
AnyIntegrations RetrieveEmailsJob Imports messages (typically IATA formats) from a POP3/O365 email account into the MessageInbound table. 

N/A

POP3/O365InactiveIt is important that this job has the standard protection parameters highlighted in green below enabled to prevent interruption to production systems when restoring data to a staging or UAT environment. 

Job Variations 

N/A


JobParameters

NameDefault ValueSample ValueComments

EmailHostName


outlook.office365.comO365 host endpoint, IP address or resolved DNS.

EmailPort


995O365 endpoint port.

EmaiUseSsl

FalseTrueTrue/False based on the authentication requirements of the O365 host.True

EmailUsername



O365 account username. 

EmailPassword 



O365 account password.

FileType


 MVTA string indicating which FileType the job should be saving to the MessageInbound table, e.g. ASM or MVT.

ProcessAttachments 

 False FalseTrue/False based on whether the job should parse the content of the email message itself or the attachment.

SubjectMatch


 .*MVT$Regular expression to match with the Subject of the message. If no match is found the email is ignored.

FromMatch


 dontreply\@messagebroker\.comRegular expression to match the From address of the message. If no matched is found the email is ignored.

BodyMatch


 MVT\rRegular expression to match in the body of the message. If no matched is found the email is ignored.

HeaderReplace 


 .*MVT\rRegular expression to match in the body of the message. If found it will be removed from the message before saving to the MessageInbound table.

HeaderReplaceWith


 MVTA string defining what the value found in the HeaderReplace parameter should be replaced with.

FooterReplace


 \r\n\*\*\*.*Regular expression to match in the body of the message. If found it will be removed from the message before saving to the MessageInbound table.

DeleteMessages

 True TrueTrue/False based on whether the job should delete the email message once it has been processed.
RequiresDatabaseName  True TrueTrue/False value which if set to True, the current SQL server name and database name must match the values specified in the ServerName and DatabaseName parameters otherwise the job queue instance is aborted.
DatabaseName

The relevant production database name.
ServerName

The relevant production SQL server instance name.
CheckIntegrationMethodOf 

Specify job types that need to be checked for IntegrationMethod subscription parameter value, separated by a comma
MinimumLevelToLog 
 DiagnosticsDefines the error log level in the event of a failure. Accepts Diagnostics, .......

Additional Information and Notes

For those customers using email as a transmission method, a number of instances of this job type are required if multiple message types (e.g. ASM, MVT and A80) are being sent to the one email inbox. An instance will be required for each message type that needs to be ingested.

Protecting Production Endpoints

Make sure that for each new instance created that the RequiredDatabaseName parameter is set appropriately, otherwise a UAT environment might start processing production data when refreshed.