Legend:
Gmail account = Current @connet.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 : Setup M365 account to connect to Apple Mail
Step 3: Import .mbox file to Apple Mail (local on your Mac)
Step 4 (Optional): Access the migrated emails from other networked PCs other than your Mac
Toubleshooting: Wrong Date issue after imported Gmail file to Apple Mail
Export emails from Gmail account to .mbox file
- 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.**
- Click the Deselect all button under Products.
- Select Mail and Next step button.
- Click Create export.
- You will receive the following email after export is completed. Click the Download your files button (it is a .zip file and includes the exported email file (.mbox file)) and save it to a preferred location on your Mac.

Setup M365 account to connect to Apple Mail
- Open the Mail App.
- Select Mail > Add Account…
- Click Microsoft Exchange.
- Enter your Name and Email Address (UID@connect.hku.hk), click Sign In.
- Click Sign In.
- Enter your email address (UID@connect.hku.hk) and HKU Portal PIN, click Sign in.
- Click Accept
Import .mbox file to Apple Mail (local)
- Select File > Import Mailboxes….
- Select Files in mbox Format and click Continue.
- Select the file downloaded from Google (.mbox file) (Step 1-5 above refers) and click Choose.
- The emails on your Gmail account will be imported under the Import folder under On My Mac.
(Optional): Access the migrated emails from other networked PCs other than your Mac
- Create new folder on M365 called Import from Gmail
- Browse to the local folder with the email just imported. Select all emails (Press CMD+A)
- Right click the selected emails -> Move to -> Exchange -> “Import from Gmail” folder on M365 account
- Wait and monitor the copy progress on the status bar
- As the task will take a long time, please connect your Mac to the power source. You may sleep when idle, it would prevent the Mail app keep moving the email when you are not using the Mac. The following power setting can prevent your Mac sleeping.
- After all old emails have been moved from Gmail to M365 mailbox. You may close the Mail app.
- You may find the old emails in the “Import from Gmail” folder. You can also use the search function to find email with keywords.
- Advise to keep the original zip file downloaded from Google Takeout on your computer or OneDrive.




OR
Troubleshooting:
In case the moving progress stopped. You may Quit and restart the Mail app, “Moving Messages” progress will resume again.
Toubleshooting: Wrong Date issue after imported Gmail file to Apple Mail
After moving old emails to M365 “Import from Gmail” folder, you may find some emails which Sent by you have wrong date. They may change to the date of your migration instead of the original Sent date of the emails.
Please follow these steps moving those emails to Sent folder to make them display the original Sent dates.
- In this example, the account owner name is Departmental Account, the mail dates are incorrect.
- In Mail app menu > View > Use Column Layout
- Sort mails by From
- Find the mails sent by your name (in this case Departmental Account) and select the mails
- Right click and move to Sent folder of your M365 account
- Browser to Sent folder, the mail date should change back to original Sent dates.
- (Optional) You may change back to default, View > Use Column Layout.