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
JobId | Group | JobType | Description | Subscriptions Supported | Endpoints Supported | Default State | Notes |
---|---|---|---|---|---|---|---|
Any | Integrations | RetrieveEmailsJob | Imports messages (typically IATA formats) from a POP3/O365 email account into the MessageInbound table. | N/A | POP3/O365 | Inactive | It 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
Name | Default Value | Sample Value | Comments |
---|---|---|---|
EmailHostName | outlook.office365.com | O365 host endpoint, IP address or resolved DNS. | |
EmailPort | 995 | O365 endpoint port. | |
EmaiUseSsl | False | True | True/False based on the authentication requirements of the O365 host.True |
EmailUsername | O365 account username. | ||
EmailPassword | O365 account password. | ||
FileType | MVT | A string indicating which FileType the job should be saving to the MessageInbound table, e.g. ASM or MVT. | |
ProcessAttachments | False | False | True/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\.com | Regular expression to match the From address of the message. If no matched is found the email is ignored. | |
BodyMatch | MVT\r | Regular expression to match in the body of the message. If no matched is found the email is ignored. | |
HeaderReplace | .*MVT\r | 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. | |
HeaderReplaceWith | MVT | A 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 | True | True/False based on whether the job should delete the email message once it has been processed. |
RequiresDatabaseName | True | True | True/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 | Diagnostics | Defines 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.