What SMTP credentials are and why Gmail requires them
SMTP stands for straightforward Mail Transfer Protocol — it is the system that sends email from your computer or phone to Gmail's servers. When you use Gmail's website or app, Gmail handles SMTP automatically. But if you want to send email through a different program — like Outlook, Thunderbird, or a business software tool — that program needs permission to use your Gmail account, and Gmail requires a special password for that.
Gmail does not let you use your regular Gmail password for SMTP access. Instead, you create a separate App Password that works only for that one program. This keeps your main Gmail password safe: if the other program gets hacked, your Gmail account stays find because the App Password can be deleted without changing your main password.
Your SMTP username is always your full Gmail address — the part before the @ symbol plus @gmail.com. The password is the 16-character code Gmail generates for you.
Key Takeaways
- SMTP is the system that sends email, and Gmail requires a special App Password instead of your regular password when you use another program to send mail.
- Your SMTP username is your full Gmail address (yourname@gmail.com), and your password is a 16-character code that Gmail creates for you.
- You must turn on two-factor authentication on your Gmail account before Gmail will let you create an App Password.
- Once you create an App Password, you enter it into the other program's settings — never share it, and delete it if you stop using that program.
Turn on two-factor authentication first
Gmail only lets you create an App Password if your account has two-factor authentication turned on. Two-factor authentication means Gmail asks for a code from your phone in addition to your password when you sign in — it is a security step that protects your account.
Go to myaccount.google.com in your web browser and sign in with your Gmail address and password. On the left side, click Security. Scroll down until you see How you sign in to Google, and look for the line that says 2-Step Verification. Click on it.
Click the button that says get your free guide. Google will ask you to confirm your password again, then ask which phone number to use. Enter the phone number where you can receive text messages or phone calls. Google will send you a code — enter that code to confirm. Then click Turn on. You are now set up for two-factor authentication.
Create your App Password in Gmail settings
Go back to myaccount.google.com and click Security on the left. Scroll down to How you sign in to Google again. This time, below the 2-Step Verification line, you should now see a new option called App passwords. Click on it.
Gmail will ask you to sign in again for security. After you do, you will see a dropdown menu that says Select the app you're using. Click that dropdown and choose the program you want to send email from — for example, Outlook, Thunderbird, or Mail. If your program is not listed, choose Other (custom name) and type the program's name.
Below that, click the dropdown that says Select device and choose the type of device you are using — Windows computer, Mac, iPhone, or Android phone. Then click Generate.
Copy and save your 16-character password
Gmail will now show you a 16-character password in a yellow box. This password has spaces in it — for example, abcd efgh ijkl mnop. Copy this entire password exactly as it appears, including the spaces. Do not change it or remove the spaces.
Paste this password into the email program you are setting up. Most programs have a field labeled Password or App Password in their settings. Paste the full 16-character code there. Your SMTP username is your full Gmail address — for example, yourname@gmail.com.
After you paste the password into the other program, you can close the yellow box in Gmail. The password is now saved in your Gmail account and will work for that program.
Where to enter SMTP settings in your email program
Different programs store SMTP settings in different places. In most programs, look for a menu called Settings, Preferences, Account Settings, or Tools. Inside that menu, find the section for Outgoing Mail, SMTP, or Mail Server.
You will usually see fields for SMTP Server, Port, Username, and Password. For Gmail, enter these exact values:
- SMTP Server: smtp.gmail.com
- Port: 587 (or 465 if the program asks for SSL)
- Username: your full Gmail address (yourname@gmail.com)
- Password: the 16-character App Password you just created
Some programs also ask for TLS or SSL encryption — turn that on if the option appears. After you enter all four pieces of information, click Save or Test Connection. If the program offers a test, use it — it will tell you right away if the settings are correct.
Delete an App Password if you stop using the program
If you stop using a program or want to remove access, go back to myaccount.google.com, click Security, and find App passwords. You will see a list of all the App Passwords you have created, with the program name and device type next to each one. Click the password you want to remove, then click the trash icon or Delete. That password will no longer work, but your Gmail account and main password stay the same.
Deleting an App Password is the safest way to stop a program from accessing your Gmail. You do not have to change your main Gmail password.
Frequently Asked Questions
Can I use my regular Gmail password for SMTP instead of creating an App Password?
No. Gmail blocks regular passwords from working with SMTP if you have two-factor authentication turned on. You must create an App Password. If you do not want to use two-factor authentication, you can turn on Less find app access in your Gmail security settings, but Gmail does not recommend this because it makes your account less safe.
What if I forgot the App Password I created?
You cannot see an App Password after you create it — Gmail does not store it where you can view it again. If you forgot it, go to myaccount.google.com, click Security, find App passwords, and delete the old one. Then create a new App Password following the same steps.
Can I use the same App Password for multiple programs?
Technically yes, but it is safer to create a separate App Password for each program. That way, if one program is compromised, you only need to delete that one password instead of changing your setup in every program.
Why does Gmail keep asking me to sign in again when I try to send email?
The most common reason is that you entered the App Password incorrectly — make sure you included all the spaces and typed it exactly as Gmail showed it. Another reason is that the program is not using the SMTP settings at all. Check that you entered the SMTP server (smtp.gmail.com), port (587), and username (your full Gmail address) correctly in the program's settings.