Migrate Gmail to Microsoft 365, or any mailbox to another provider

Migrate Gmail to Microsoft 365, Outlook.com, Exchange or IMAP with folders, read state and labels: back up the old mailbox, then move it into the new one.

To migrate Gmail to Microsoft 365, back up the Gmail mailbox and then restore that backup into the Microsoft 365 account. Mail Attachment Downloader does both on your own system: the folders are made in the new mailbox, and read and unread, stars and Gmail’s labels (as Outlook categories) can come along. It works the other way too, and between Google Workspace, Microsoft 365, Outlook.com, Exchange and any IMAP mailbox.

What you need to move email from Gmail to Outlook or Microsoft 365

  • The edition: moving mail is part of PRO Backup and every edition above it. The free edition shows the Backup tab as a preview only.
  • Both accounts set up in the program: the old one, whose backup you move, and the new one, which takes the emails.
  • A new mailbox that takes mail back: IMAP (Gmail and Google Workspace too), Microsoft 365, Outlook.com or Exchange. A POP3 account can’t take mail in.
  • Windows 10 or later: on a PC, a server or a cloud VM. The emails go from the old mail server to your system and on to the new one, with no Gearmage cloud in between.

It moves email and its attachments. Calendars, contacts, rules and signatures aren’t included.

Step by step: transfer a mailbox to another provider

1. Add the old and the new account

Click Add account and type the email address. The provider is picked from it. Click Test Connection: Gmail, Google Workspace, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Then click Save. Do this for both mailboxes.

The Mail account and server configuration window of Mail Attachment Downloader for ap@contoso.example: provider tiles Gmail and Workspace, Outlook.com, Microsoft 365, Yahoo, AOL, Exchange and Other, Microsoft 365 picked from the address, sign-in with a Microsoft account in the browser, Microsoft Graph, This is a shared mailbox ticked
Adding the new Microsoft 365 mailbox: the provider is picked from the address, and Test Connection signs in through your browser.

2. Keep the whole old mailbox in the backup

Open the Backup tab and use Change account to pick the old account. On the Configuration page, choose Its own and Hold everything for Forever, so no email ages out of the backup before it is moved.

The Backup tab's Configuration page in Mail Attachment Downloader for finance@contoso.com, a Microsoft 365 account: Its own, Hold everything for Forever, at most No limit, and a copy of the backup on Office NAS (\\nas\backups)
Configuration: Its own, Forever keeps each email of the old account until you have moved it.

A backup reads the account’s folders from its start date. To move all of it, click Folders and Backfill (Downloads): on the Downloads tab, Choose other folders… ticks the folders, and Backfill emails… brings in the older mail. What the backup covers then says “Full backup: every folder, all mail, backup copies held for ever.”

A backup run is the account’s Connect and Download. So it doesn’t also save attachments to a folder, choose Nothing: back up only under What to save on the Account rule tab.

3. Back up the old mailbox

Go to Run a backup and click Back up now. The first backup copies each email once, encrypted, as the mail server sent it. A big mailbox can take hours: stop it at any time, and the next run goes on where it stopped.

The Run a backup page of Mail Attachment Downloader: 18,431 emails received since 3/3/2019 in the backup (4.2 GB), last backup completed 1 h ago, runs every day at 7:00, the Back up now button and Folders and Backfill (Downloads)
Run a backup: how many emails the backup holds, and Back up now.

Still using the old account while you switch? Run Back up now again just before the move, so the latest emails come along.

4. Move the backup into the new account

Open the Restore page.

  1. Under Which emails, choose The whole backup, or Some folders.
  2. Under Into, choose Another account: and pick the new mailbox. Only accounts that can take emails back are listed.
  3. Check the Folders list: each folder of the backup goes into the folder on its right, made when missing. Inbox, Sent, Drafts, Trash, Junk and Archive are matched by what each mail server says they are. Change any of them, or choose Leave out.
  4. To keep the old mail apart, use Put everything under one folder: with a name such as Old Gmail. Choose Keep the folder structure under it, or put all the emails straight into that one folder.
  5. Under Keep, tick what comes along: read and unread and flags (stars), and Gmail’s labels or Outlook categories.
  6. Click Restore… and confirm.
The Restore page of Mail Attachment Downloader for the backup of finance@contoso.com: Some folders with INBOX/Invoices ticked, Into this account or Another account: ap@contoso.com, the Restore button, and the result: 2,412 emails restored, 489 still there, the folder Inbox/Invoices made again, 3 too large or damaged to restore
The Restore page: pick the folders, then Another account under Into to move them to a different mailbox.
Mail Attachment Downloader's Restore page for the Google Workspace backup of finance@contoso.com going into another account, finance@contoso.onmicrosoft.com on Microsoft 365: INBOX into Inbox, Sent Mail into Sent Items, Invoices made new, Spam left out, keeping read state, flags and Gmail's labels as Outlook categories
Moving a Gmail mailbox to Microsoft 365: each folder goes into the folder on its right, and labels become categories.

Nothing is deleted from the old account: a move is a copy. Emails already in the new mailbox are left alone, so none goes in twice. While the move runs, the new account doesn’t download.

5. Go on with a large move

Gmail takes about 500 MB of uploads a day, so a big move into Gmail or Google Workspace stops there and goes on the next day. If you stop a move, or the mail server refuses more emails, click Go on with the restore later. It starts after the last email put back in each folder.

When it ends, the page says how many emails went in, which folders were made, and which emails couldn’t go in and why, such as an email larger than the new mailbox takes.

Gmail labels vs Outlook folders: what comes along

  • Folders: made in the new mailbox when missing, with the names in the list.
  • Labels: in Gmail one email can have several labels, and each label shows up as a folder. The email goes into the new mailbox once, into the first of its folders in the list. Tick Gmail’s labels, as Outlook categories and its labels come along as categories. From Microsoft 365 into Gmail, Categories, as Gmail labels does the reverse.
  • Archived Gmail: emails only in All Mail, with no other label, come along too.
  • Stars: Gmail’s Starred and Important are not folders of their own: a star becomes a flag.
  • Read and unread: asked of the old account as the move starts, so keep it open until the move ends. If it can’t be asked, emails come in as read.
  • Dates: each email keeps the date it was received. Microsoft 365 takes each one as a message made from it, with the same sender, recipients, date, text and attachments; the backup keeps the original.

Other moves: Microsoft 365 to Gmail, IMAP to Microsoft 365

The steps are the same for any pair: Microsoft 365 to Google Workspace, Yahoo or a web host’s IMAP mailbox into Microsoft 365, or an on-premises Exchange server into Microsoft 365. Exchange connects through EWS, Microsoft 365 and Outlook.com through Microsoft Graph. See Move mail to another kind of account and Microsoft 365 and Exchange.

Old mail in files? Import brings a PST, MBOX or folder of .eml files into an account’s backup, and from there it moves like the rest. To keep a copy outside any mailbox, Export saves the backup as PST, MBOX, EML, MSG, PDF or ZIP: see Export emails to PST, MBOX, EML or PDF.

Questions people ask

Does migrating delete my emails from Gmail?

No. The move is a copy: nothing is deleted from the old account, and the backup keeps its copy too.

Are contacts and calendars moved?

No. Email and attachments only. Calendars, contacts, rules and signatures aren’t included.

How long does it take to move a mailbox to Microsoft 365?

The first backup of a big mailbox can take hours. Into Gmail, a move goes at about 500 MB a day. Both can be stopped and go on later.

Can I move just one folder?

Yes. Choose Some folders under Which emails and tick the folders, or choose emails Received between two dates.

Can I move Microsoft 365 email to Gmail?

Yes. Back up the Microsoft 365 account and move it into the Gmail account; categories can come along as Gmail labels.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Planning a move for a whole team? Contact us.

Export emails from Gmail and Microsoft 365 to PST, MBOX, EML or PDF

Export Gmail, Microsoft 365, Exchange or IMAP email to PST, MBOX, EML, MSG, PDF or ZIP, and import PST, MBOX and EML files back, step by step.

Need your mail as files? Maybe a PST for Outlook, an MBOX archive, or a PDF of each email for a lawyer or an auditor. Mail Attachment Downloader exports emails from Gmail and Google Workspace, Microsoft 365 and Outlook.com, Exchange, or any IMAP or POP3 mailbox to PST, MBOX, EML, MSG, PDF or ZIP.

It also works the other way: it imports PST, MBOX and EML files. This post shows both, with the names you see in the program.

What you need

  • PRO Backup or any edition above it. Export and Import are on the Backup tab. The Free edition shows that tab as a preview only.
  • Windows 10 or later, 64-bit. No Outlook or other email program is needed, not even to write a PST file: the program connects to the mail server itself.
  • The mailbox added with Add account. Gmail, Google Workspace, Microsoft 365 and Outlook.com sign in with your browser.

Step 1: back up the mailbox

Export doesn’t read the mail server. It writes the files from the account’s backup: an encrypted copy of the emails, kept on your own system. So the mailbox is backed up first. The full walkthrough is in Back up Gmail and Microsoft 365 email. In short:

  1. Open the Backup tab and pick the account with Change account.
  2. On the Configuration page, choose Its own and set Hold everything for to Forever (or as long as you need). An email with no copy in the backup can’t be exported.
  3. On the Run a backup page, click Back up now.

The first backup reads the account’s folders from its start date and copies each email. A big mailbox can take hours. You can stop it at any time, and the next run goes on where it stopped. For older emails, use Backfill emails… on the Downloads tab.

The Run a backup page of the Backup tab for finance@contoso.com, a Microsoft 365 account: 18,431 emails in the backup since 3/3/2019, the last backup an hour ago, the Back up now button, and how a backup works
Back up the mailbox first. Later runs add only the new emails.

Step 2: export the emails

  1. On the Backup tab, open the Export page.
  2. Under Which emails, choose The whole backup, Received between two dates, or Some folders and tick them, for example INBOX/Invoices.
  3. Under As, choose the format (see the next section).
  4. Under To, click Browse… and choose the folder, for example D:\Exports\Finance.
  5. Click Export. A line shows how far it got, and Stop ends it early.
  6. When it’s done, click Open the folder.

The files follow the mailbox’s folders. Each file is named by the date, time, sender and subject, such as 2026-11-11 0902 - Acme Corp - Invoice 4411. Exporting again replaces the files instead of adding copies, so you can repeat an export each month.

If some emails have no copy in the backup, the page lists them, and the export goes on without them.

The Export page for finance@contoso.com: Which emails set to Some folders with INBOX/Invoices ticked, As set to PST: one Outlook data file with the folders, To D:\Exports\Finance, and the result: Exported 2,901 of 2,904 emails, 3 of them with no copy in the backup
Export the Invoices folder of a Microsoft 365 mailbox to one PST file.

Want just a few emails? On the Search page, type a subject, sender or file name and click Search in History. The results open in the Downloads tab. Pick one email, or several with Ctrl or Shift, and choose “Export N emails…”. The Export page then offers “The 12 emails picked in the Downloads tab” (with your number) under Which emails.

Which format to choose

The Backup tab's Export page for finance@contoso.com: Some folders with INBOX/Invoices ticked, and the As list open with EML, MBOX, MSG, PST, PDF and ZIP, PST chosen
The six formats on the Export page, each with what it makes.
  • PST: one Outlook data file with the folders. For Outlook. The whole export is one Unicode PST file, with the mailbox’s folders inside it. In classic Outlook, open it with “File › Open & Export › Open Outlook Data File”.
  • MBOX: one file per folder. For Thunderbird, Apple Mail and archive tools. Thunderbird needs an import add-on, such as ImportExportTools NG, to open MBOX files.
  • EML: one file per email, as the server sent it. The standard email file. Outlook, Thunderbird and most email programs open it, and nothing is changed in it.
  • MSG: one Outlook file per email. Outlook’s own single-email format. Handy when a case file, a ticket or a document management system wants Outlook items.
  • PDF: one per email, its attachments next to it. For reading, printing and legal or audit requests. Each PDF has the email’s header and text, and its attachments are saved beside it as they are.
  • ZIP: the EML files in one zip. One file to hand over, upload or keep.

Save emails as PDF in bulk

To save a whole folder or a date span as PDFs, choose PDF: one per email, its attachments next to it, as in step 2. That’s a one-time export. To turn new emails into PDFs as they arrive, use a rule with a Convert documents step instead (PRO Rules Client). See convert emails to PDF or TIFF.

Import PST, MBOX and EML files

Old mail in a file can go into an account’s backup, where you can search it, export it or restore it.

  1. On the Backup tab, pick the account and open the Import page.
  2. Under Mail files, in What, choose PST: an Outlook data file, with its folders, MBOX: a Thunderbird or Apple Mail file, or a folder of them, or EML: a folder of .eml files (its subfolders are folders).
  3. Under From, click Browse… and choose the file or folder, for example D:\Old mail\archive-2019.pst.
  4. Click Import.

Each email keeps its folder from the file. An email already in the backup (the same Message-ID) is left out, so importing the same file again adds nothing. Imported emails are only kept in the backup: your rules don’t run on them, and nothing is uploaded to the mailbox. Each import shows up as a run under Backup runs.

The Import page for finance@contoso.com: What set to PST: an Outlook data file, with its folders, From D:\Old mail\archive-2019.pst, and the result: Imported 12,840 emails, 1,204 were already in the backup, 2 could not be read; below it, Another computer's backup
Import an old PST file into the account’s backup. Emails already there are skipped.

Convert MBOX to PST (and PST to MBOX)

There is no direct file-to-file converter. Converting is two steps: import, then export.

  1. Import the MBOX file into an account’s backup, as above.
  2. On the Export page, tick the imported folders under Some folders, and choose PST: one Outlook data file with the folders under As.

Note: the file’s Inbox goes into the account’s Inbox, so exporting that folder takes the account’s own Inbox emails too.

The same works from PST to MBOX, EML, MSG or PDF, and from a folder of EML files to PST. The emails stay in the backup afterwards. Want them in a mailbox instead of a file? The Restore page puts a backup’s emails back on the mail server, or, with Another account: in its Into box, into a different kind of account. See Restore.

Extract data: addresses and email details to CSV

Sometimes you don’t need the emails, just a list. The Extract data page writes a CSV file that Excel opens, from the same backup:

  • One row per email: received, from, to, cc, reply-to, subject, folder, attachments and size.
  • One row per email address: the people in these emails, each once: name, domain, first and last email. Tick Leave out this account’s own addresses, and no-reply ones (noreply@, mailer-daemon@…) to keep the list clean.

Click Extract now, or tick After each backup run, add the addresses of the emails it backs up. An address extracted again replaces its own row, so the file never lists it twice. Sending marketing emails to these people may need their consent. The Free edition can try it on up to 25 emails of the last day.

The Extract data page for sales@contoso.com: The whole backup, One row per email address, addresses from From, To, Cc and Reply-To, the columns Name, Seen as, First email and Last email, the CSV path D:\Marketing\sales-contacts.csv, and the result: Wrote 2,316 addresses from 18,431 emails
Extract data: one row per email address, written to a CSV file.

Good to know

  • POP3: POP3 accounts can be backed up and exported, but not restored.
  • Export and Import don’t change the mailbox.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

How to back up Gmail and Microsoft 365 email to your own system

Back up Gmail, Microsoft 365, Exchange or IMAP email to an encrypted, searchable copy on your own system, then restore deleted emails or whole folders.

An email deleted by mistake or a mailbox closed when someone leaves can cost you mail you need. In this post we back up a Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange or IMAP mailbox to an encrypted copy on your own system, keep it as long as you choose, search it, and put emails back. The tool is the Backup tab of Mail Attachment Downloader.

What PRO Backup is, and what it isn’t

  • An edition of the program: PRO Backup includes everything in the free edition. PRO Parser and the PRO Rules editions include it too.
  • On your own system: the program runs on Windows 10 or later, on a PC, a server or a cloud VM, reads your mailbox directly and stores the backup there, encrypted. There is no Gearmage cloud in between.
  • Email only: emails and their attachments; not calendars, contacts, rules or signatures.
  • Free shows a preview: in the free edition the Backup tab explains what it does, but no copy of an email is kept, and History holds 1 day.

Step by step: back up a mailbox

1. Add the mailbox

Click Add account and type the email address. The provider is picked from it; for an IMAP mailbox elsewhere, the server is usually filled in for you. Click Test Connection: Gmail, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Then click Save. For a Microsoft 365 shared mailbox, tick This is a shared mailbox.

The Mail account and server configuration window for ap@contoso.example with the Microsoft 365 tile chosen, sign-in with a Microsoft account in the browser, Microsoft Graph and This is a shared mailbox ticked
Adding a Microsoft 365 mailbox: pick the provider, then Test Connection signs in through your browser.

2. Choose how long the backup keeps emails

Open the Backup tab. Each account has its own backup; Change account at the top switches between them. On the Configuration page:

  • Same as the global Backup settings uses the times and size set in Settings › Storage and clean-up.
  • Its own gives this account its own: Hold everything for a time from 30 days to Forever, and at most a size, or No limit.

An email deleted or moved on the mail server stays in the backup for that long.

The Backup tab's Configuration page for finance@contoso.com, a Microsoft 365 account: Its own, Hold everything for Forever, at most No limit, and a copy of the backup on Office NAS (\\nas\backups)
Configuration: how long this account’s backup holds its emails, and where copies of it go.

The backup reads the account’s folders from its start date. For more folders, or older mail, click Folders and Backfill (Downloads). A backup run is the account’s Connect and Download, so it also saves files as What to save says; choose Nothing: back up only on the Account rule tab to keep the backup only.

3. Run the first backup

Go to Run a backup and click Back up now. The first backup reads the folders and copies each email. A big mailbox can take hours: stop it at any time, and the next run goes on where it stopped.

Every backup after that only fetches what is new. Each email is stored as the mail server sent it, encrypted, and once, even when it is in several folders.

The Run a backup page: 18,431 emails received since 3/3/2019 in the backup (4.2 GB), last backup completed 1 h ago, runs every day at 7:00, the Back up now button and How a backup works
Run a backup: what is in the backup, the last run, the schedule and Back up now.

To keep it up to date on its own, set a schedule in the Schedule tab › App schedule: every 15 minutes, hourly or at a set time. Tick Also download new email as soon as it arrives and IMAP accounts are backed up within seconds, Microsoft 365 accounts about every minute.

4. Copy the backup to a NAS, S3 or Azure Blob

A backup on one computer is lost with that computer. Once a day an encrypted restore point of all accounts can go to another place.

  1. First make a recovery key: Settings › Encryption and restore points › Make a recovery key…. It opens the copies on another computer. It is shown once and Gearmage doesn’t keep it, so save it somewhere safe.
  2. On the Configuration page, click Add a place to back up to… and give it a Name.
  3. In Where it goes, choose A folder on this computer or a network folder (a NAS such as \\nas\backups), a network share with its own sign-in, Amazon S3 or a service like it, or Azure Blob Storage. The last three use a connection you add in Settings › Sources › Cloud Connections.
  4. Tick Also back up the copies of emails to copy the emails themselves, not only the backup’s records (off by default: they can be large).
  5. Keep Daily at or after 02:00, Daily points kept 7 and Weekly points kept 4, or change them, and click Save.
The Add a place to back up to window: name Office NAS, a folder on this computer or a network folder, \\nas\backups, Also back up the copies of emails ticked, daily at or after 02:00, 7 daily and 4 weekly points kept
A place to back up to: a network folder on the office NAS, with a restore point every day.

5. Search the backup

On the Search page, type a subject, sender or file name and click Search in History, or click Show all of this account’s emails. It searches the backup itself, without connecting to the mail server, so it also finds emails deleted from the server. The results are in the Downloads tab. Pick one email, or several with Ctrl or Shift, and choose Restore… or Export… for just those.

6. Restore deleted emails or whole folders

Open the Restore page.

  1. Under Which emails, choose The whole backup, Received between two dates, or Some folders, for example INBOX/Invoices.
  2. Under Into, keep this account, or choose Another account: to put them into a different mailbox, such as ap@contoso.com.
  3. Click Restore… and confirm.

Each email goes back into the folder it came from, and a folder deleted since is made again. An email that is still there is left alone, so restoring twice adds nothing. Emails come back as read, with the date they were received. A large restore can be stopped and continued later with Go on with the restore.

The Restore page for finance@contoso.com: Some folders with INBOX/Invoices ticked, Into this account, the Restore button, and the result: 2,412 emails restored, 489 still there, the folder Inbox/Invoices made again
Restore: put a folder back into the mailbox it came from, or into another account.

Good to know before you restore:

  • Restore works with IMAP (Gmail too), Microsoft 365 and Exchange accounts. POP3 can’t take mail back: export those emails instead.
  • Microsoft 365 takes each email as a message made from it, with the same sender, recipients, date, text and attachments. The backup keeps the original.
  • Gmail takes about 500 MB of uploads a day, so a big restore stops there and goes on the next day.

7. Import old PST, MBOX or EML files

On the Import page, under Mail files, choose What: a PST file, an MBOX file or folder, or a folder of .eml files. Pick it in From with Browse… and click Import.

Each email keeps its folder, and emails already in the backup are left out. Your rules don’t run on imported emails unless you choose Process again in the Downloads tab.

The Import page: PST, an Outlook data file with its folders, from D:\Old mail\archive-2019.pst, 12,840 emails imported and 1,204 already in the backup, and Add from another computer's backup
Import: bring an old PST into the account’s backup. Duplicates are left out.

Lost the computer? On a new one, set up the same account and click Add from another computer’s backup… with the old computer’s recovery key.

Export, or move mail to another kind of account

The Export page saves emails from the backup as files other programs open: EML, MBOX, MSG, PST for Outlook, PDF or ZIP. See Export emails to PST, MBOX, EML or PDF.

To change providers, choose a different kind of account under Into on the Restore page, such as Gmail into Microsoft 365, or Yahoo into an IMAP mailbox. Read and unread, flags and Gmail’s labels (as Outlook categories) can come along. It is a copy: nothing is deleted from the old account. See Move mail to another kind of account.

More good to know

  • More than 3 accounts: PRO Backup runs up to 3 accounts in one run; the others are kept and run on their own. PRO Parser runs up to 5, the PRO Rules editions any number.
  • Around the clock: backups run while the program runs. To run as a Windows service, even when nobody is signed in, you need PRO Rules Server.
  • Nothing downloaded twice: each account’s History remembers the emails it has seen.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.