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
- Login to Gmail. Go to myaccount.google.com.
- Security → 2-Step Verification → must be enabled.
- Bottom of 2-Step page → App passwords.
- Select app: Mail. Select device: Other → name (e.g. «Thunderbird»).
- 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.