How to move a local copy of the mailbox to a new IMAP server

emailmail.app

My mailbox has just been shut down without notice by my internet provider, because the internet connection had been cancelled some time ago. There is no way I can access it now, the IMAP server refuses the connection.

I just created a Gmail account to use as my new email.

I have a copy of most of my emails on my laptop, in the Mail app. Is there a way I can transfer these old emails to my new mailbox?

I read that there are ways to do an IMAP-to-IMAP copy with third-party software such as Thunderbird, but this is not possible for me as I lost access to the old IMAP server. I hope there is a way to upload the local copy of my old emails to my new mailbox.

Best Answer

The first idea I had:

Can you just forward the emails to the new account? But that means some data is not right like the sender and the recipient.

So my other attempt:

To repeat your situation I used a software which blocks the Internet connection. And I was able to create a .mbox file. (the screenshot was taken later so the iCloud account is online again)

export as .mbox

In mail app I imported the .mbox file as a local import. Then I selected the mail and clicked move to and moved it to my other mail account.

Import Mailboxes

I hope I could repeat your situation well, if not please tell me which steps not work for you. Maybe my answer is completely not working for you. I think there are much cleaner ways to do your task with python scripts (like this, or that), but I think this solution is the easiest.