Skip to content

Importing your EML messages to Proton Mail

cuthix edited this page Sep 13, 2024 · 4 revisions

NOTE: If you represent a business, please contact your Proton customer success agent or via our business contact form.

Thank you for trusting Proton Mail and choosing to support millions of users worldwide to have access to a privacy first email service. You can read more about the impact that we make together on our website.

This document is intended to help you to migrate to Proton Mail and to import your EML / MBOX files which you have exported from your previous mailbox.

If your email server is hosted by Google, Outlook, or can otherwise be accessed using IMAP, we recommend using Easy Switch to migrate your messages. Easy Switch is a user friendly solution that will ensure a smooth transition without friction.

In the case your email server is not accessible using Easy Switch, this document is for you. The procedure is technical, so if you are not confident in your knowledge around the topic, we suggest asking a more technical person's help to perform the import.

Why are we writing this guideline?

Proton Mail works differently to other providers who do not use end-to-end encryption (E2EE) by default. Using this type of encryption means that some features are more difficult or even impossible to implement, as opposed to with an unencrypted provider.

As an example, due to end-to-end encryption, we cannot read your messages and that prevents us from having a public-facing IMAP server like imap.protonmail.com. Instead, we provide Proton Mail Bridge that acts as a middle-man on your computer and connects your email client to Proton servers. It ensures that the same encryption is used with IMAP and SMTP on your device.

We also cannot access your messages when you are importing them locally from your email client, as the messages are encrypted before they are sent to Proton servers. This prevents us from proactively debugging importing issues. That is why we might ask you to send us problematic EML files for testing when we are debugging issues with importing.

This guideline helps you to import your local EML files to Proton Mail without the need to contact us.

Importing local EML / MBOX files into Proton Mail

Most email providers will use EML and MBOX for exporting your messages, these file types have been accepted as industry standard over the years. The main difference between EML and MBOX files is that an EML file represents a single email, while an MBOX file represents a folder of emails — essentially a group of EML files.

In this article, we will shift the focus to EML files as singular emails, however, bear in mind that the similar rules apply to MBOX imports as well.

What are EML Files?

Email is a very old protocol, and EML files are used as file format to store mail content on disk. The most widely cited standard for electronic message is RFC-822. It was later expanded and obsoleted by many e.g. RFC-1521, RFC-5322 and others. Even though the original format didn't changed much over the years, not all providers fully abide by the format, and some messages might have invalid formatting — e.g. invalid headers field or encoding. Software bugs in email clients / provider services can also cause RFC-invalid messages.

That said, EML files are simple text files with specific formatting rules. You can open an EML file in a text editor to make changes and resolve many issues which might be cause the import failure. There are also free and open-source tools to work with EMLs.

Email clients such as Thunderbird can also be used to open and read EML files without importing them, this is sometimes helpful to sort out messages before importing them.

Proton Mail Bridge tries to fix formatting issues IMAP import and convert the encoding to utf8 to follow RFC standards (RFC3501 and some extensions), but only is situations when it can be done without any data loss or change of meaning. Therefore, some messages couldn't be processed and Proton Mail Bridge has to reject the import in order to not cause any unwanted changes nor create invalid messages.

Email import workflow

Proton Mail provides multiple options for importing emails:

  • Easy Switch (free) - a simple way to import from Gmail, Outlook, or IMAP servers
  • Export tool (free) - for restoring export of Proton Mail accounts
  • Proton Mail Bridge (premium) - for importing EML or MBOX files

Easy Switch is an online tool to perform an automated migration from an external provider where you can access the account through Outlook / Gmail API, or through public IMAP. This tool can be used with free or paid accounts.

Export tool is a desktop application that allows you to export and restore data between Proton Mail accounts, it does not work with exports generated outside the Export tool. Export tool is available for all free or paying users.

To migrate your EML or MBOX files, you need to use Proton Mail Bridge. Bridge is a desktop application that provides an IMAP interface to your email client which allows you to import emails from files. Bridge is available for paid accounts only to support the development on tools those are available for free users. Read more about our business model on our website.

Prior importing your messages

Before starting with the import of your messages, we would recommend making preparations to ensure that the import goes smoothly:

  • Ensure that the messages are valid
  • Organize your data
  • Create any folders / labels on your Proton Mail account which you plan to import into

Ensure that the messages are valid

Email files need to abide by RFC standards. We have provided some details on this topic previously, however, in short, invalid messages cannot be imported.

Most of the issues with importing messages will be due to invalid headers, so we will provide some pointers below as to what you should be looking for. In many cases, the error returned when importing the EML file will tell you which header is causing the issue.

Addresses which are invalid per RFC standards will cause the import to fail. Some things you can check for:

  • Ensure the From/To/CC headers contain addresses accepted by the standard. In some cases, exported EMLs contain only a name or a group name instead of a full address.
  • Make sure there are no invalid characters in the address.

If you need to import a message with an invalid address, you can open the EML file with a text editor and edit the field to correct the address.

Proton Mail supports messages with the size of up to 25 MB with up to 100 attachments within the message. If your messages are larger than this, you will not be able to import them.

Organize your data

Depending on how you've exported the data and the method you plan to use to import it, it can be useful to organize your data before starting the import.

If the EML files you have are not sorted into folders, you can create the folders you'd like the messages to be in and move the EML messages into those folders.

Create any folders / labels on your Proton Mail account which you plan to import into

While this is not always are requirement depending on the method you are using for import, we suggest creating the folders on your Proton Mail account ahead of time.

Keep in mind you can only create up to 3 folders and 3 labels on the Proton Mail Free plan, if you need to have more folders (such as when migrating from a different Proton account), you can choose one of our paid plans.

How to use Proton Mail Bridge to import your messages

When it comes to importing EML and MBOX files into Proton Mail, you will need to use Proton Mail Bridge and an email client. We recommend Mozilla Thunderbird as it is free, open source, available on Windows, macOS, Linux, and has useful plugins that will help during the process.

Bridge can be downloaded from our website: https://proton.me/mail/bridge

Thunderbird is available here: https://www.thunderbird.net/

Once you install Bridge, you will see the setup wizard which will assist you in configuring your account with an email client. If you need additional information on setting up your email client, you can refer to this guide.

Thunderbird already provides a good method to import emails, however, with the ImportExportTools NG extension, this process is made even easier. Note that this extension is not developed by Proton, however, it is open-source and is vetted by the community.

To import EML files using Thunderbird, drag-and-drop the EML files from a folder on your device into a folder on Thunderbird. When using ImportExportTools NG, you can right-click any folder and then use the extension for a more streamlined import process.

Good practices when importing

To ensure that the import goes smoothly and does not affect any previous messages you had, you can use some recommended practices.

  • Import under a label: If you are importing a single folder of messages, you can import the messages under a label, and then copy them to a folder. This will ensure that you can always separate the imported messages from the other messages in the imported folder.
  • Import under a special import folder: You can create a custom folder where you will place all your imported messages. Folders can have up to 3 levels, so you will still be able to create any needed folders under this parent folder. This will separate your imported emails from any existing emails.

The above two options will also allow you to quickly roll back the import by deleting all the messages if you need to do so.

How to verify if the migration was correct?

The easiest method to confirm that all messages were imported is to compare the number of messages in Proton Mail and in your folder with EMLs.

First, take the below two steps on Proton Mail Web:

  • Disable conversation grouping: Settings → All Settings → Messages and Composing → Conversation Grouping
  • Switch to column mode: Settings → Layout → Column

Now, when you open the folder or label from the web application, you will be able to see the total number of messages in the folder within the right panel.

When to contact us and what information we need to help you

If you face errors when importing messages that are not discussed in this guideline, or if find that the total number of messages is not the same as in your folder on your computer, you can reach out to us, so we can investigate your case.

We will require the following information:

  • Logs from the Bridge application (Report a problem from Bridge)
  • The EML file failing the import if you are getting specific error messages

In some cases we can provide you with assistance even just by knowing the error message returned by the email client, however, to be able to help you to resolve the issue we will likely need the problematic EML files as well.