Import from Gmail
This guide explains Generate a Gmail App Password and import your history. so you can complete the TrekMail task with confidence.
Article details
Type, difficulty, plans, and last updated info.
▼
Article details
Type, difficulty, plans, and last updated info.
- Type
- Guide
- Difficulty
- Intermediate
- Plans
- Starter · Pro · Agency
- Last updated
- Apr 29, 2026
Importing from Gmail (or Google Workspace) requires an App Password because Google blocks standard IMAP logins for third-party apps.
Step 1: Create a Gmail App Password
- Log in to your Google Account at myaccount.google.com.
- Go to Security and enable 2-Step Verification if it isn't already active. (Google requires this before App Passwords are available.)
- Search for App passwords in the search bar at the top of your Google Account settings.
- Click App passwords and create a new one:
- App: Mail
- Device: Other — name it "TrekMail Import"
- Copy the 16-character code. You will use this instead of your real Google password.
Step 2: Enable IMAP in Gmail
- Open Gmail and go to Settings (gear icon) → See all settings.
- Click the Forwarding and POP/IMAP tab.
- Under IMAP access, select Enable IMAP.
- Click Save Changes.
Step 3: Start the import in TrekMail
- Go to Migration in the TrekMail sidebar.
- Click the Gmail provider card. The connection settings are filled in automatically (
imap.gmail.com, port 993, SSL). - Email address: Enter your full Gmail address (
you@gmail.com). - Password: Paste the 16-character App Password from Step 1. Do not use your regular Google password.
- Click Check connection to verify and load your folders.
- In Step 2, select the folders you want to import and set any options.
- In Step 3, choose your destination TrekMail mailbox and click Start import.
Common mistakes
- "Authentication failed / invalid credentials" — Google no longer accepts regular account passwords for IMAP access. This applies to all Gmail and Google Workspace accounts — even when the password is correct. You must use an App Password (Step 1 above).
- "App passwords not available" — 2-Step Verification must be enabled on the account first. Go to myaccount.google.com/security and enable it, then return to create the App Password.
- "IMAP disabled" — IMAP is off by default in Gmail. Complete Step 2 above.
- Google Workspace admins: Each user must enable 2-Step Verification on their own Google account before an App Password becomes available to them. You can enforce this in the Workspace Admin Console under Security → Authentication → 2-Step Verification.
Migrating many Gmail accounts?
Use the Bulk Import tab to migrate an entire team at once. See Migrate from Google Workspace (Bulk).
Related articles
Jump to nearby guides that continue the workflow.