Steps to Migrate Email from Gmail to M365 using MS Outlook on Mac

Video Guide on Migrate Emails Using Outlook Client on Mac

Turn on IMAP on Gmail

  1. Logout from all Google accounts and open an Incognito/InPrivate browser.
  2. Go to https://webmail.hku.hk and click the button CONNECT.HKU.HK (Google, read-only)

    Go to https://webmail.hku.hk and click the button CONNECT.HKU.HK (Google, read-only)

  3. Login with your UID and password.

    Login with your UID and password

  4. At the top right, click Settings and See all settings.

    At the top right, click Settings and See all settings

     

  5. Click the Forwarding and POP/IMAP

    Click the Forwarding and POP/IMAP

     

  6. In the “IMAP access” section, select Enable IMAP. Click Save Changes.

    In the “IMAP access” section, select Enable IMAP. Click Save Changes

  7. Under your account icon, click Manage your Google Account.

    Under your account icon, click Manage your Google Account

  8. Under Security, in the Less secure app access section, set “Allow less secure apps:” to ON.

    Under Security, in the Less secure app access section

    set “Allow less secure apps:” to ON

  9. Please check all the labels in Gmail, to make sure all label doesn’t contain special character.

    Rename any label with special character: ~ ` ! @ # $ % ^ & * ( ) _ + = { } | [ ] \ : ” ; ‘ < > , . ? /

    check the labels in Gmail

Adjust Power Setting of Mac

  1. Since the mail migration process may take a long period of time, please connect your Mac to the power adapter.
  2. To prevent Mac from sleeping when idle, go to Menu > System Preferences > Energy Saver or Battery > Power Adapter > check Prevent your Mac from automatically sleeping when the display is off

    To prevent Mac from sleeping when idle, go to Menu > System Preferences > Energy Saver or Battery > Power Adapter > check Prevent your Mac from automatically sleeping when the display is off

    Energy Saver icon  OR Battery icon

    To prevent Mac from sleeping when idle, go to Menu > System Preferences > Energy Saver or Battery > Power Adapter > check Prevent your Mac from automatically sleeping when the display is off

    Older macOS 10.x can follow this setting:

    Older macOS 10.x can follow this setting:

    Older macOS 10.x can follow this setting:

Create a Temporary Outlook Profile

  1. Ensure the Outlook app has been quit.
  2. Open Finder
  3. Open Finder
  4. Choose Right click Microsoft Outlook > Show Package Contents.
  5. Choose Right click Microsoft Outlook > Show Package Contents.
  6. Select Contents > SharedSupport > Outlook Profile Manager.
  7. Select Contents > SharedSupport > Outlook Profile Manager.

    Select Contents > SharedSupport > Outlook Profile Manager.

    Select Contents > SharedSupport > Outlook Profile Manager.

  8. Press +.
  9. Press +.
  10. Name the new profile. (e.g., Migration)
  11. Name the new profile. (e.g., Migration)
  12. Right click the new profile and choose Set Default. Close the Outlook Profile Manager.Right click the new profile and choose Set Default. Close the Outlook Profile Manager.

Add Gmail Account to Outlook Client (IMAP)

  1. Open Outlook and enter your HKU connect email address. Click Continue.

    Open Outlook and enter your HKU connect email address. Click Continue.

  2. Click Not Office 365?.

    Click Not Office 365?

  3. Select IMAP/POP.

    Select IMAP/POP

  4. Enter your HKU connect email address and password. Input the Incoming Server and Outgoing Server accordingly.

    Enter your HKU connect email address and password. Input the Incoming Server and Outgoing Server accordingly

  5. Click Allow in the pop-up window.

    Click Allow in the pop-up window.

  6. The Google account is added successfully.

    The Google account is added successfully

  7. If the Outlook app automatically added the Microsoft 365 account, select the Microsoft account, and delete it by pressing . Then, select Sign Out. It prevents exporting new mails from the Microsoft account in later steps.

    If the Outlook app does not add the Microsoft 365 account automatically, please ignore this step.
    Please make sure Gmail account is the only one account on Outlook before you proceed to the next step.

    If the Outlook app automatically added the Microsoft 365 account, select the Microsoft account, and delete it by pressing -. Then, select Sign Out. It prevents exporting new mails from the Microsoft account in later steps.

    If the Outlook app does not add the Microsoft 365 account automatically, please ignore this step. Please make sure Gmail account is the only one account on Outlook before you proceed to the next step.

  8. Check the synchronisation of mails
    Choose Tools > Sync Status.

    Check the synchronisation of mails Choose Tools > Sync Status.

  9. Please keep your computer online and wait until all the mails are synchronised to the Outlook app. When all mails are synced, items in Sync Status should be cleared.



    Please keep your computer online and wait until all the mails are synchronised to the Outlook app. When all mails are synced, items in Sync Status should be cleared.

Export emails from Gmail account to local .olm file

  1. If your Outlook is using “New Outlook” user interface as below, please Revert to Legacy Outlook interface, before proceed.
  2. If your Outlook is using “New Outlook” user interface as below, please Revert to Legacy Outlook interface, before proceed.
  3. Choose Tools > Export.
  4. Choose Tools > Export
  5. Select Items of these types: > Emails > Continue.
  6. Select Items of these types: > Emails > Continue.
  7. Name the file (e.g., ‘Imported from Gmail’) and click Save.
  8. Name the file (e.g., ‘Imported from Gmail’) and click Save.

Connect M365 account to Outlook client

  1. Choose Outlook > Preferences.

    Choose Outlook > Preferences

  2. Select Accounts.

    Select Accounts.

  3. Update the Account description, change from uid@connect.hku.hk to Gmail uid@connect.hku.hk.

    Update the Account description, change from uid@connect.hku.hk to Gmail uid@connect.hku.hk

  4. Press + > New Account.

    Press + > New Account.

  5. Input your HKU connect email address. Wait for Outlook to connect to Office 365.

    Input your HKU connect email address. Wait for Outlook to connect to Office 365.

    Input your HKU connect email address. Wait for Outlook to connect to Office 365.

  6. Input your password in the pop-up window.

    Input your password in the pop-up window.

    Input your password in the pop-up window.

  7. Select the Microsoft account. Update the Account description, change from uid@connect.hku.hk to M365 uid@connect.hku.hk.

    Select the Microsoft account. Update the Account description, change from uid@connect.hku.hk to M365 uid@connect.hku.hk.

  8. You will see both Google account and Microsoft 365 account appear in the Outlook app.

    You will see both Google account and Microsoft 365 account appear in the Outlook app.

Import .olm file to M365 account

  1. Choose Tools > Import.

    Choose Tools > Import.

  2. Choose Outlook for Mac archive file (.olm) > Continue.

    Choose Outlook for Mac archive file (.olm) > Continue.

  3. Choose the exported file and click Import.

    Choose the exported file and click Import

    Choose the exported file and click ImportChoose the exported file and click Import

  4. The imported file should appear under On my Computer.

    The imported file should appear under On my Computer

Move the imported mails to M365 account

  1. Long press the imported file. Drag and drop it to your M365 account.

    Long press the imported file. Drag and drop it to your M365 account

    Long press the imported file. Drag and drop it to your M365 account

  2. Choose Tools and check Sync Status.

    Choose Tools and check Sync Status

    Choose Tools and check Sync Status

Verify the Migration Results in Webmail

  1. After all the tasks are cleared in Sync Status, go to https://outlook.office.com/mail/
  2. Log in Microsoft 365 HKU connect account.
  3. Choose click gear wheel > View all Outlook settings

    Choose gear wheel > View all Outlook settings

  4. Go to General > Storage. Check the number of messages in all the folders imported from Google mail.

    Go to General > Storage. Check the number of messages in all the folders imported from Google mail.

Remove the Temporary Profile

  1. After migrating all the mails, you may remove the temporary profile.
  2. Ensure the Outlook app has been quit.
  3. Open Finder

    Open Finder

  4.  ChooseRight click Microsoft Outlook > Show Package Contents.

    Choose Right click Microsoft Outlook > Show Package Contents.

  5. Select Contents > SharedSupport > Outlook Profile Manager.

    Select Contents > SharedSupport > Outlook Profile Manager.

    Select Contents > SharedSupport > Outlook Profile Manager.

    Select Contents > SharedSupport > Outlook Profile Manager.

  6. Select the temporary profile. Click .

    Select the temporary profile. Click -

  7. Choose Delete.

    Choose Delete

Troubleshooting

The Outlook Import/Export function on Mac is grey out like this:

The Outlook Import/Export function on Mac is grey out like this:

Revert Outlook to Legacy version
It is a problem of the new Outlook interface. Please change “New Outlook” to “Legacy Outlook” using the following steps:

  1. Under Menu > Outlook > deselect New Outlook. Click Revert to confirm this change.

    1. Under Menu > Outlook > deselect New Outlook. Click Revert to confirm this change.

  2. Click Revert to confirm this change.

    Click Revert to confirm this change

  3. Restart your Mac and the interface will be changed to Legacy Outlook and the Import and Export options will be available.

    3. Restart your Mac and the interface will be changed to Legacy Outlook and the Import and Export options will be available

    Restart your Mac and the interface will be changed to Legacy Outlook and the Import and Export options will be available.
3
25

MFA

Multi-Factor Authentication

February 2024
February 2024

Mandatory for all staff accounts

April 2024
April 2024

Mandatory for all student accounts