← All articles

Gmail App Password — IMAP/SMTP setup in 2026

Why App Password is needed

If 2FA is enabled in Gmail, regular apps (Thunderbird, Outlook, SMTP scripts in Python/PHP) can't login with main password. Google requires special 16-char App Password — separate password per app, no 2FA code.

Step-by-step generation

  1. Login to Gmail. Go to myaccount.google.com.
  2. Security → 2-Step Verification → must be enabled.
  3. Bottom of 2-Step page → App passwords.
  4. Select app: Mail. Select device: Other → name (e.g. «Thunderbird»).
  5. Google shows 16-char password in 4 groups of 4. Copy it (won't be shown again).

IMAP/SMTP settings

IMAP: imap.gmail.com:993 SSL. SMTP: smtp.gmail.com:465 SSL or 587 TLS. Login: full email. Password: 16-char App Password.

Common error solutions

Authentication failed — check you use App Password, not main. Daily SMTP limit — 500/day regular, 2000/day Workspace.