Connecting to a New Mail Source

Note: This content is no longer updated. For the latest content, please go to the user guide for M-Files Online. For information on the supported product versions, refer to our lifecycle policy.

To connect to a new mail source:

  1. Open M-Files Admin.
  2. In the left-side tree view, expand a connection to M-Files server.
  3. Expand Document Vaults.
  4. Expand a vault.
  5. Expand Connections to External Sources and select Mail Sources.
  6. In the task area, click New Mail Source.
    Result:The Connection Properties dialog is opened.
  7. In Description, enter a description for the new connection.
  8. 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.
    • Google Mail using IMAP4: Connect to Google Mail with the IMAP4 protocol.
  9. In the Configuration section, enter the required 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.
    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.
    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 Azure Active Directory application.

    For example: 00112233-4455-6677-8899-aabbccddeeff

    Client ID The client ID (also called application ID) of your Azure Active Directory application.

    For example: 00112233-4455-6677-8899-aabbccddeeff

    Client secret The client secret of your Azure Active Directory 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 using IMAP4 Client ID The client ID of your OAuth application.

    For example: 833377787449-9k39jmvkpctlb5hr40554cgmfi3lesjp.apps.googleusercontent.com

    Client secret The client secret of your OAuth application.

    For example: P_ifREDH1E8-MAIRHI1JYmkT

    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.
  10. 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.
  11. 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.
    1. In Delay between checks, enter the time interval in seconds between synchronizations.
  12. 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.
  13. Optional: On the Metadata tab, define properties for new objects created via this connection.
  14. Optional: On the Advanced tab, set an alias for this connection.
    For more information, see Associating the Metadata Definitions.

    When you have automatic aliases 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>. Define automatic aliases for your vault in the configurations editor.

  15. Click OK.
    This locks the Service type setting. Create a new connection to change the service type.
Email messages are imported to M-Files from the mail source with the specified settings. You can optionally change advanced settings for a Microsoft Exchange Online or Google Mail mail source in the Connections to External Sources > Mail Sources Common section of Advanced Vault Settings.