Steps to Migrate Email from Gmail to M365 (Thunderbird)

Video Guide on Migrate Emails Using Thunderbird

Legend:

Gmail account = Old @connect.hku.hk account on Google

M365 account = New @connect.hku.hk account on Microsoft

Step 1: Export emails from Gmail account to .mbox file

Step 2: Procedure to Access Exchange Online Using Thunderbird

Step 3: Import .mbox file to Thunderbird Local folders

Step 4: Copy old mails from Local folders to M365

Export emails from Gmail account to .mbox file

Logout from all Google accounts and open an Incognito/InPrivate browser before doing the following steps.

  1. Go to https://takeout.google.com/settings/takeout and login using uid@connect.hku.hk and your HKU Portal PIN.

    **If you see the error: “Transfer Your Content is only available to authorised G Suite for Education Accounts. Please contact your administrator”, this may due to the reason that you are using the same browser to login to another Gmail account.  Please make sure you logout from all Google accounts and try to above step again.**
  2. Click the Deselect all button under Products.

    Click the Deselect all button under Products
    Click the Deselect all button under Products

  3. Select Mail and Next step button

    Select Mail and Next step button
    Select Mail and Next step button

  4. Click Create export.

    Click Create export
    Click Create export

  5. You will receive the following email after export is completed. Click the Download your files button and save to your device (for Windows users we suggested to save the file to Download; for Mac users, please save it on the Desktop). The exported file is in .zip format and included the exported email file (.mbox file), please extract the file first before you imported to Thunderbird. In this example, we extracted to H:\temp\Takeout

    Click the Download your files button

Procedure to Access Exchange Online Using Thunderbird

Please download and install Thunderbird email client of latest version through the below link if not yet installed.

https://www.thunderbird.net

After installation of Thunderbird, please follow the steps as below.

  1. Open Thunderbird.
  2. Your full name> enter the name you want it to appear in the From field of your email messages
  3. Email address > enter your HKUPortalUID@connect.hku.hk
  4. Password > enter your HKU Portal PIN

    Enter your Name, Email address (UID@connect.hku.hk) and Password (HKU Portal PIN), and click Continue

  5. Click Configure Manual and input the setting.

    Click Configure Manual and input the setting.

    After click Done, it will prompt the login Microsoft 365 page to login your account.

    login with username and portal PIN

  6. Click Finish to complete the setup.

    Click Finish to complete the setup

  7. You can see the new email account.

    You can see the new email account

  8. Rename the account

    Rename the account

    Prepend “M365” in front of the new account name to avoid mix up with other existing accounts.

    Prepend “M365” in front of the new account name to avoid mix up with other existing accounts

  9. Change Synchronization settingSynchronization & Storage -> Disk Space -> Synchronize the most server 1 Days.

    This setting help to prevent the Thunderbird keep downloading the uploaded old emails back to local and cause slowness.

    Change Synchronization setting

    Close the Account Settings tab.

Import .mbox file to Thunderbird Local folders

  1. Install ImportExportTools NG add-on

    Install ImportExportTools NG add-on
    Install ImportExportTools NG add-on
    Install ImportExportTools NG add-on
    Install ImportExportTools NG add-on

  2. Import old email which downloaded from Google Takeout in the previous steps.

    Make sure the zip file was extracted.

    We should import the old mails to Local Folders first, instead of directly import to M365. This way is more reliable, just take up more disk space of your local computer.

    Right click the Local Folders -> ImportExportTools NG -> Import mbox file

    Right click the Local Folders -> ImportExportTools NG -> Import mbox file

    Choose Select a directory where searching the mbox files to import (also subdirectories)” and OK

    Choose Select a directory where searching the mbox files to import (also subdirectories)” and OK

  3. Browse to the location of the Takeout directory you extracted previously. Click Select Folder button.

    Click Select Folder button

  4. Confirm to import the All mail Including Spam and Trash.mbox

    Confirm to import the All mail Including Spam and Trash.mbox

  5. It will take a few minutes to import all mails. A new folder under Local Folders will be created, which contains all email from the Connect Gmail account.

    It will take a few minutes to import all mails. A new folder under Local Folders will be created, which contains all email from the Connect Gmail account

Copy old mails from Local folders to M365 (may have long processing time)

This process will take very long time, before you start, please make sure you have a delegated computer with stable network connection to perform the migration.

  1. Create a new folder under your M365 account by right clicking the M365 mailbox > New Folder

    Create a new folder under your M365 account by right clicking the M365 mailbox > New Folder

     

  2. Create a new folder name as Import from Gmail

    Create a new folder name as Import from Gmail

     

  3. Under Local Folders, select “All mail inc…mailbox” , select not more than 2,000 Selecting too many email to move will cause problem, don’t select more than 2,000 email at one time.

    Under Local Folders, select “All mail inc…mailbox” , select not more than 2,000 Selecting too many email to move will cause problem, don’t select more than 2,000 email at one time

  4. Right-click the selected 2,000 email > Move To > M365 YourUID@connect.hku.hk > Import from Gmail

    Please use Move To instead of Copy To, it make you easy to trace which mails are not yet moved.

    Please use Move To instead of Copy To, it make you easy to trace which mails are not yet moved

  5. You will see the progress on the status bar. Please wait until it complete, it may take about 30-60 mins. The speed may vary, depends on network and client/server status.

    You will see the progress on the status bar

    If you login M365 webmail https://mail.office365.com/connect.hku.hk and monitor the count of the Import from Gmail folder. If the number is keep growing, migration is in progress.

    If you login M365 webmail https://mail.office365.com/connect.hku.hk and monitor the count of the Import from Gmail folder. If the number is keep growing, migration is in progress

  6. After the 2,000 selected email are moved to M365, please repeat step 2-5 for another batch of 2,000 email. Repeat until the source folder under Local Folders empty. If you don’t have enough time complete all batches at once, you may close the Thunderbird and computer and continue again at your convenience.
  7. All old emails have been moved from Gmail to M365 mailbox. You may close the Thunderbird.
  8. You may find the old emails in the “Import from Gmail” folder. You can also use the search function to find email with keywords.
  9. Advise to keep the original zip file downloaded from Google Takeout on your computer or OneDrive. In case you look for any missing item, you can re-import again.
19
12