This guide explains how to configure Gmail to work with the Mail Support System.
Gmail does NOT allow you to use your regular password for IMAP/SMTP access from third-party applications. You must create an App Password.
Before you start, you need:
- A Gmail account
- 2-Step Verification enabled (required for App Passwords)
If you haven't already enabled 2-Step Verification:
- Go to your Google Account: https://myaccount.google.com
- Click on Security in the left menu
- Under "Signing in to Google", click 2-Step Verification
- Follow the setup wizard to enable it (you'll need your phone)
Once 2-Step Verification is enabled:
-
Go to: https://myaccount.google.com/apppasswords
- Or: Google Account → Security → 2-Step Verification → App passwords
-
You may need to sign in again
-
Click on "Select app" dropdown:
- Choose "Mail"
-
Click on "Select device" dropdown:
- Choose "Other (Custom name)"
- Type:
Mail Support Systemor any name you prefer
-
Click "Generate"
-
Google will display a 16-character password like:
abcd efgh ijkl mnop⚠️ IMPORTANT: Copy this password immediately!- You won't be able to see it again
- Remove spaces when pasting:
abcdefghijklmnop
-
Launch the GUI:
python gui/app_gui_v2.py
-
In the "System Configuration" section, enter:
- Email Address:
your-email@gmail.com - Password:
abcdefghijklmnop(the App Password from Step 2) - IMAP Server:
imap.gmail.com - SMTP Server:
smtp.gmail.com
- Email Address:
-
Click "Save Configuration"
Edit the .env file in the project root:
EMAIL=your-email@gmail.com
EMAIL_PASSWORD=abcdefghijklmnop
IMAP=imap.gmail.com
SMTP=smtp.gmail.com- In the GUI, click "📬 Check Mail"
- If configured correctly, you should see a message about checking emails
- If you get an authentication error, verify:
- App Password is correct (no spaces)
- 2-Step Verification is enabled
- You're using the App Password, not your regular password
- ✅ Make sure you're using the App Password, not your regular Gmail password
- ✅ Check that the App Password has no spaces:
abcdefghijklmnop - ✅ Verify 2-Step Verification is enabled on your Google Account
- Go to: https://mail.google.com/mail/u/0/#settings/fwdandpop
- Under "IMAP Access", select "Enable IMAP"
- Click "Save Changes"
- This is no longer needed! Google removed this option.
- Use App Passwords instead (the modern, secure method)
- Make sure 2-Step Verification is enabled (required!)
- Some Google Workspace accounts may have this disabled by administrators
-
App Passwords are safer than "less secure apps" because:
- They're unique per application
- They can be revoked individually
- They don't expose your main password
-
Revoking an App Password:
- Go to: https://myaccount.google.com/apppasswords
- Click on the app name
- Click "Remove"
- The application will immediately lose access
-
Keep your App Password secret:
- Don't share it
- Don't commit it to Git (it's in
.gitignore) - Store it securely
Similar to Gmail:
- Go to: https://account.microsoft.com/security
- Enable 2-Step Verification
- Create an App Password
- Use these settings:
- IMAP:
outlook.office365.com - SMTP:
smtp.office365.com
- IMAP:
Check your email provider's documentation for:
- IMAP server address
- SMTP server address
- Whether App Passwords or special credentials are required
- Check the logs in the GUI or terminal for specific error messages
- Verify your internet connection
- Try creating a new App Password
- Check Google's status page: https://www.google.com/appsstatus
Gmail Settings Summary:
Email: your-email@gmail.com
Password: [16-char App Password, no spaces]
IMAP: imap.gmail.com
SMTP: smtp.gmail.com
App Password Generator: https://myaccount.google.com/apppasswords
Enable IMAP: https://mail.google.com/mail/u/0/#settings/fwdandpop
Note: This guide is current as of October 2024. Google may update their security settings. Check their official documentation if steps don't match: https://support.google.com/accounts/answer/185833