You can load attachments of Outlook 365 emails received by one or more specified shared email addresses (for example, [email protected]) into a Document Management Scan Batch ready for indexing. This process applies several levels of security to ensure that the documents imported are safe and relevant.
Import Documents from Email is a report, so it can be scheduled to run automatically.
Processing
Configuration
Security
Importing email attachments
To import email attachments, you must be logged in to COINS using Microsoft Azure Active Directory.
Move the email messages you want to process into the folder designated as the Outlook Folder to Import From. This is a folder immediately below the Inbox that receives the emails.
Go to Document Management > Input > Import Documents from Email.
Select the profile. This is a combination of the email address to process, the company, and the document category. You might have separate profiles for different types of attachment, for example.
Either:
Select an existing batch to import the documents into.
Select Create New Batch and select the Pool.
Click Next.
Coins ERP+ processes the emails in the Outlook Folder to Import From and applies various security checks. If these are successful, Coins ERP+ adds the attachment files to the batch you specified, and moves the emails to the folder designated as the Outlook Folder to Move Imported Messages To. Any errors are logged in the report.
Configuration
For each user who will process emails, in AAD Permissions, grant permission for
Mail.ReadWriteorMail.ReadWrite.Shared(or both).For each receiving email address, create folders, or choose existing folders, that will contain:
emails that are ready to process
emails that have been processed
The folders must be immediately below the Inbox. You can create more than one of each type of folder, to hold emails with different types of document.
In Email Import Maintenance, add one or more profile records for each receiving email address. This lets you inform Coins ERP+ which folders to use, and specify the default document category for new batches.
The Relationship of Sender provides an extra layer of security. Documents are only processed if the domain of the sending email address exists on a company record with one of the selected company types. For example, if the profile for [email protected] has Supplier and Subcontractor ticked, an email from [email protected] to [email protected] will only be processed if there is an email address with the domain supplier.com on a company record in Central Repository that is defined as supplier or subcontractor.
Parameters
DM/EXCLFLTP
File types to ignore when importing scanned images
A comma-separated list of file types which will be ignored when importing scanned images in Import Scanned Images (for example: db,csv,txt).
Leave the parameter blank if you don't want to ignore any files.
DM/MAILFULLVAL
List of Domains requiring full email address validation when importing
A list of email domains for which a full email match must exist in the Central Repository if attachments are to be loaded.
When loading attachments from emails using Import Documents from Email, if the sender's email is from a domain in this list, the full email address must exist on a company record (of the company type specified in Email Import Maintenance) in the Central Repository. This protects against importing from common general domains such as gmail.com or aol.com.
Security
As an initial security check, someone has to review the messages in the Inbox and move them into the appropriate folder.
When the report is run, Coins ERP+ processes all emails in the specified folder directly below the Inbox that have an attachment of type “fileAttachment”, as follows:
Compares the file extension of the attachment against the list of file types to be ignored, as specified by DM parameter EXCLFLTP. If the extension is not valid, the attachment is not imported and a message is logged in the report.
Compares the file extension of the attachment against the list of file types in the MIME Types set up in DM. If the extension is not found, the attachment is not imported and a message is logged in the report.
Checks that the MIME type of the file returned by Microsoft in “contentType” exactly matches the MIME Type on file in Coins ERP+ for that extension. If no match is found (including a match for extension + n), the attachment is not imported and a message is logged in the report.
Compares the sender email address domain with a list of domains from all central repository companies’ mail addresses that match the Relationship Type. If the domain on the sending email address is found in the DM parameter MAILFULLVAL, a full email address match (instead of domain only) is required to import. This protects against importing from common general domains (for example, gmail.com or aol.com). If no match is found, the attachment is not imported and a message is logged in the report.
If no errors are found, the file is downloaded to a temporary location on the Coins ERP+ Server, and the following validations are applied:
The antivirus configured in Coins ERP+ is run on the file. If the file is identified as a malicious file, it is deleted from the server and a message is logged to the report. The original message is preserved and is left in the “ready to process” folder.
Coins ERP+ verifies that the attachment can be converted to or is already using code-page UTF-8. If it can not, the file is deleted and a message is logged to the report.
If all the above validations are successfully completed, the temporary file is re-named to the original attachment filename and is added to the indicated batch.


