Connecting to a New Mail Source
To connect to a new mail source:
- Open M-Files Admin.
- In the left-side tree view, expand a connection to M-Files server.
- Expand Document Vaults.
- Expand a vault.
- Expand Connections to External Sources and select Mail Sources.
-
In the task area, click New Mail Source.
Result:The Connection Properties dialog is opened.
- In Description, enter a description for the new connection.
-
In Service type, select one of these options:
- Generic POP3 service: Use the POP3 protocol to connect to a mail service that is not listed here.
- Generic IMAP4 service: Use the IMAP4 protocol to connect to a mail service that is not listed here.
- Microsoft Exhange Online: Connect to Microsoft Exchange Online.
Refer to this document for instructions on how to set up an OAuth application in Azure Portal: Azure Portal Configuration for Microsoft Exchange Online as External Mail Source. You will need the application details in step 9.
Note: Microsoft Exchange Online connections cannot be set up or edited with Microsoft Windows Server 2016. You can do the setup and editing remotely with a supported Microsoft Windows operating system. - Google Mail (IMAP4): Connect to Google Mail with the IMAP4 protocol.
-
In the Configuration section, enter the necessary information for your
service type. See the information in the table.
Service Setting name Description Generic POP3 service Mail server The IP address or domain name of the mail server. Use encrypted connection (SSL/TLS) Specifies whether the connection to the server is encrypted. In most cases, encrypted connection is necessary.
Note: The M-Files server and the mail server must use TLS (Transport Layer Security) 1.2 or later.Port number The communication endpoint of the mail server. Username The username to access the mail server. Password The password for the user. Generic IMAP4 service Mail server The IP address or domain name of the mail server. Use encrypted connection (SSL/TLS) Specifies whether the connection to the server is encrypted. In most cases, encrypted connection is necessary.
Note: The M-Files server and the mail server must use TLS (Transport Layer Security) 1.2 or later.Port number The communication endpoint of the mail server. Folder The folder from which M-Files reads and imports the mail to the vault. Username The username to access the mail server. Password The password for the user. Microsoft Exchange Online Tenant ID The tenant ID (also called directory ID) of your Microsoft Entra ID application. For example: 00112233-4455-6677-8899-aabbccddeeff
Client ID The client ID (also called application ID) of your Microsoft Entra ID application. For example: 00112233-4455-6677-8899-aabbccddeeff
Client secret The client secret of your Microsoft Entra ID application. For example: sXXtFz1UtYMRCVc.2.23TMC-94-T.yK-84
Folder The email address and folder from which M-Files reads and imports the mail to the vault. For example: [email protected]/Inbox or [email protected]/Important/Sales. HTTP proxy This is an optional setting. For authentication and email requests to use a proxy server, enter the address and port of the server. For example: 192.168.1.1:8080. The proxy server must support the SSL protocol. Google Mail (IMAP4) Client ID The client ID of your OAuth application. For more information, refer to Google Cloud Platform Configuration for Gmail as External Mail Source. Client secret The client secret of your OAuth application. For more information, refer to Google Cloud Platform Configuration for Gmail as External Mail Source. Folder The folder from which M-Files reads and imports the mail to the vault. HTTP proxy This is an optional setting. For authentication and email requests to use a proxy server, enter the address and port of the server. For example: 192.168.1.1:8080. The proxy server must support the SSL protocol. - Optional:
In the Action section, select the appropriate options:
Select the option... If you want to... Include attachments Import attachments with email messages. Import only messages that have attachments Import only the email messages that have attachments. Delete messages from server after importing Remove the messages from the mail server automatically when they have been imported to M-Files. Make sure that any information only supported by the email server is not lost. Remove attachments from server after importing Remove the attachments from the mail server when the email messages have been imported to M-Files. This option is available only if the selected service type is not Generic POP3 service and the option Include attachments is enabled. Save in Outlook message format (*.msg) Save the email messages to M-Files in the Outlook message format (MSG). Attachments are stored in the MSG file and the messages appear in M-Files as single-file documents (see Single-File and Multi-File Documents). Note: This functionality requires Microsoft Exchange Server or a 32-bit MAPI client to be installed on the M-Files server.If you want to save the email messages as RFC 822 compliant EML files, configure the registry setting that follows on the M-Files server computer.Key HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFServer\Vaults\<vault GUID>\ MailSources\<external mail source name> Value name StoreEmailInRawEmlFormat Value type REG_DWORD Description When this is enabled, M-Files stores new email messages as EML files. Default value 0 Disabled Valid values 1 Enabled 0 Disabled This registry setting overrides the selected storage format option. For the changes to take effect, you must restart the M-Files Server service.
Separate attachments from the message Save attachments separately from the body of the message. This option can be enabled only if the option Save in Outlook message format (*.msg) is enabled. The message without its attachments is saved to an MSG file, and any attachments are stored beside the MSG file in their original file formats. If the message contains attachments, the message and its attachments appear in M-Files as a multi-file document. - Optional:
Select the Check for new and deleted files periodically check box to enable
M-Files to synchronize with the mail server at predefined intervals.
-
In Delay between checks, enter the time interval in seconds between
synchronizations.
Warning: Short synchronization intervals can cause performance issues if there are many connections to external sources.
-
In Delay between checks, enter the time interval in seconds between
synchronizations.
- Optional:
Click Refresh Now to synchronize the vault with the mail server right
away.
Click Refreshing Status... to see the current status of the refreshing process.
- Optional:
On the Metadata tab, specify properties for new objects created through this
connection.
For more information, see Defining Automatic Metadata for a Mail Source.
- Optional:
On the Advanced tab, set an alias for this connection.
Use semicolons (;) to separate many aliases.For more information, see Associating the Metadata Definitions.
When automatic aliases are in use and you write a name on the General tab, the Aliases field on the Advanced tab is automatically filled in. The alias has the format <predefined prefix>.<name>. Configure automatic aliases for your vault in Advanced Vault Settings.
-
Click OK.
This locks the Service type setting. Create a new connection to change the service type.