If you are transferring a website between servers using the normal migration process, email messages will already be transferred as part of the normal migration process. But if you are migrating the sites manually, you may be wondering how to get the email accounts and messages transferred.
The easiest way to do this is likely by using a mail client such as Thunderbird. If you have a different mail client you prefer, it is likely to have similar functionality, but these instructions will be specific to Thunderbird.
Note that in order to do this, you will need to have enough free space in your computer to store all of the emails in the account, twice.
First, configure the mail client for the account in the old server. If this is an email account you routinely check, this may already have been completed. If you do not usually check this email account using Thunderbird,1) then you will need to add it to Thunderbird.
In the left side pane, where the accounts are listed, highlight either one of the email accounts, or the "Local Folders" folder. These are normally all in bold. When one of these is selected in the left side pane, the main area will show, among other things, a section labeled "Accounts", where one of the subsections is "Create a new account:", under which one of the choices is "Email". Click where it says "Email".
Next, Thunderbird will prompt if you would like to get a new email account through one of Thunderbird's partnerships. Since we are configuring to connect to an already-existing account, we want to choose "Skip this and use my existing email".
After that, will be a window prompting you for basic information about the email account: "Your name:", "Email address:", and "Password:". You can use whatever you like for "Your name:", but the "Email address:" and "Password:" have to be the email address we are configuring and the password that goes with that email account. Once these have been entered in, click "Continue", and Thunderbird will attempt to autodetct the settings.
Before accepting what it detects, check the settings with those given to you by the old email host, to make sure Thunderbird is attempting the connection correctly. If at all possible, we want to connect using IMAP for incoming (and SMTP for outgoing). You may need to click "Manual Config" in order to make changes to the connection information.
Note that if you have already changed the DNS of the domain to point to the new server, you may need to enter in the IP address of the old server instead of the "Server Name", to make sure you are still connecting to the old mailserver.
When you think the settings are correct, click "Re-test" to make sure.
If Thunderbird is able to find the settings, click "Advanced Config".
In the left pane of this new window, look for "Server Settings" under the old email account. It is recommended to make sure "Check for new messages every ___ minutes" is not checked.
Next, go to "Synchronization and Storage". Make sure "Keep messages for this account on this computer", "Synchronize all messages locally regardless of age", and "Don't delete any messages" are all checked. Then click "Advanced" under "Message Synchronizing".
In this "Advanced" window, make sure every folder and subfolder is checked in the account. Make sure all expansions are expanded in the account so that you can see all the subdirectories to make sure they are also checked.2) Then click "OK".
Then click "OK" from the "Account Settings" window too.
After this, Thunderbird will likely start downloading lots of messages. But there is one more thing to check to make sure we will have all of them. In the left pane in Thunderbird, highlight the account name, right-click, and choose "Subscribe".
Make sure all subdirectories are selected. Make sure to expand all expansion arrows, and use the scrollbar and "Refresh" and "Subscribe" buttons as needed. Once all subdirectories are selected for subscription, click "OK".
Depending on how much email is in the account, how much of it you had already downloaded, and your connection speed, downloading the messages may take some time. While it progresses, you can go ahead and start on the next few steps.
Once you have started Thunderbird downloading the messages from the old server, you will want to make sure the email account exists in the new server to copy the messages back to. If this is a cPanel server and you have not yet created the cPanel account, you can read more about the process here. This article will also walk you through the process of creating an Email Account. Once the email account exists in the new server, then we are ready to configure Thunderbird to connect to the email account in the new server.
As before, start by highlighting one of the existing account names, or "Local Folders" in the left pane of Thunderbird. Then in the main pane in section "Accounts", subsection "Create a new account:" choose "Email". Again, when it asks you if you want to create a new email address with one of their partnered providers, choose "Skip this and use my existing email". Enter whatever you like for "Your name:", and enter in the "Email address:" and "Password:" for the account we just created.3) Click "Continue".
This time, it is almost certain that the autodetected information will be incorrect, unless you have already switched over the domain's DNS to point to the new server.
For "Server hostname", you can put the server's hostname if it resolves to the new server already. If it does not, you can put the new server's IP address for now. (We can change it to the "prettier" hostname later once it resolves.) For the drop-down box next to "Incoming" be sure to choose IMAP. For SSL it is recommended to use STARTTLS. Make sure the username is the full email address, not just the part before the
@.4) The port and the authentication method should be able to autodetct once these are set correctly, so click "Re-test". Check the Advanced Config as before, then click "Done".
You may need to confirm a "security exception" for the new server's mail certificate, for example if the certificate is self-signed, or if you used a different "Server hostname" in the connection settings than the real hostname of the server.
If you did need to confirm the security exception, and if you will be needing to send messages using this account in this Thunderbird installation, it is recommended at this time to send a test message to trigger the security exception prompt for the SMTP port. To do so, make sure the new account is selected and click "Write" to open a composition window.
Make sure the "From" line shows the new account. The "To:" line can be somewhere else if desired, but it can also be the same account. Make sure to have a Subject and body in the message. When the message is finished being composed, click "Send".
If needed, confirm the security exception:
Then click "OK" to the sending error:
After that, click "Send" in the composition window again. This time, it should work.
Once the account is connected, check the subscriptions and the synchronization settings, as in Step 1. Then, when we are ready to copy the messages and folders, Thunderbird will be ready to re-upload them.
If the messages from the old server are still downloading, wait for them to finish. Once it looks like they have finished, double-check by using the drop-down box next to "Get Messages" in the button bar near the top. In the drop-down list, choose "Get All New Messages".
If all or nearly all of the messages have been downloaded then the check shouldn't take very long. But if the download did take a long time, it is possible that more messages had been delivered to that mailbox while the download was in progress, so it would still be a good idea to recheck just in case.
Once you are sure all of the messages have been downloaded, it is time to copy the messages and directories from the old account to the new account within Thunderbird. After that, the messages will start uploading.
First, go to the "Inbox" folder in the old account. If the whole account display is collapsed, you may need to click the expansion arrow to the left of the account name in order to see the Inbox folder. Once you are in the Inbox folder of the old account, click on one of the messages and then use "Ctrl+A"6) on the keyboard to select all of the messages.7) Once they are all selected, right-click on any of them and choose "Copy To → <choose the new email account> → Inbox → Inbox".
After this, is to copy the subdirectories. The easiest way for most of the subdirectories is by drag-and-drop. First, select all the first-level folders in the old account with the folder icon.8) If there are many such folders, you can select them all at once by clicking on the top of them, then holding down the Shift key, then clicking the bottom of them, then releasing the shift key. If any folders have any other icons, hold down the Ctrl key while clicking on each one, so that only subdirectories with the folder icon are selected.
Once the desired folders are all selected, make sure "Inbox" is visible in the list for the new account in the left pane. If it isn't, you may need to expand it with the expansion arrow to the left of the account name. Once you are able to see the "Inbox" of the new account, and at least one of the selected folders of the old account, you will need to drag and drop the selected area into the Inbox of the new account. To do this, position the mouse cursor over the selected folders, hold down the left mouse button, move the cursor to be positioned over the Inbox folder in the new account, then release the mouse button.
After that, you should be able to see the newly-copied folders under the new account.
If you need any messages from the "standard" subdirectories (eg, Drafts, Sent, Archive, Junk, spam, Trash, etc) you will need to copy the messages themselves as with the messages that were loose in the inbox.
If there are a lot of messages, Thunderbird may take some time to copy the files between one account and another within your computer; it should show a progress message at the bottom of the window. Afterwards, click on each folder in the new account to make sure you see the messages in them. You may need to visit each folder within Thunderbird to make sure it knows to synchronize the folders. It may also help to choose "Get All New Messages" again from the dropdown list at the top next to the "Get Messages" button. The synchronization of the messages back up to the new server will, on most home connections, likely take longer than it took to download the messages from the old account, since many home internet connections have slower upload bandwidth than download bandwidth.
Once the synchronization has completed, log into webmail in the new server to check that the messages are present as expected. If this is a cPanel server, then in your new server, go to url
https://X.X.X.X:2096 in your web browser, and log in with the email account and password you have configured for this email account. As before, make sure to use the full email address as the password. It should look like
firstname.lastname@example.org, not just the
emailuser section by itself.
If this is your first time loging in, or you have otherwise not yet set a default webmail application, it may ask you which webmail client you would like to use.9) Any of the presented options should work. Once you have chosen a webmail client, check that the expected messages are present.