Gmail SMTP credentials are your email address and an app password, not your regular Gmail password

When you set up email on your phone, tablet, or desktop mail client, you need SMTP credentials to send messages through Gmail's servers. Your SMTP username is your full Gmail address — the one that ends in @gmail.com. Your SMTP password is not your regular Gmail password. Instead, Gmail requires you to create a separate app password, a 16-character code that only works for mail clients and other third-party apps.

This two-password system exists because your main Gmail password unlocks your entire account — email, photos, documents, payment methods. An app password is weaker by design: it only sends and receives mail, and you can delete it anytime without changing your main password. If a mail app gets hacked, the damage is limited.

Key Takeaways

  • Your SMTP username is your complete Gmail address, such as yourname@gmail.com.
  • Your SMTP password is a 16-character app password you create in your Google Account settings, not your regular Gmail login password.
  • You can only create an app password if you have two-factor authentication turned on for your Google Account.
  • Gmail's SMTP server address is smtp.gmail.com, port 587 with TLS encryption, or port 465 with SSL encryption.

Turn on two-factor authentication first

Google only lets you create app passwords if two-factor authentication is active on your account. Two-factor authentication means you need both your password and a code from your phone to sign in — it makes your account much harder to break into.

Go to myaccount.google.com in a web browser and sign in with your Gmail address and password. On the left side, click Security. Scroll down to "How you sign in to Google" and look for 2-Step Verification. If it says "Off", click it and follow the steps. Google will ask you to confirm your phone number and will send you a test code. Once you see the green checkmark that says "2-Step Verification is on", you can move to the next step.

Create an app password in your Google Account

With two-factor authentication on, go back to myaccount.google.com and click Security on the left. Scroll down again to "How you sign in to Google" and this time look for App passwords. (If you don't see it, make sure two-factor authentication is actually on — sometimes it takes a few minutes to appear.)

Click App passwords. Google will ask you to sign in again. After you do, you'll see two dropdown menus: one for "Select the app" and one for "Select the device". For the app, choose Mail. For the device, choose Windows Computer, Mac, iPhone, Android, or Other (custom name) depending on what you're setting up. Then click Generate.

Google will show you a 16-character password in yellow text. This is your app password. Copy it exactly — spaces are part of it. You'll paste this into your mail client in the next step. Google won't show it again, so if you close the window without copying it, you'll have to generate a new one.

Enter your credentials into your mail client

Open the mail app on your device — Outlook, Apple Mail, Thunderbird, or whatever you use. Look for settings, preferences, or "Add Account". The app will ask for your email address, incoming mail server, and outgoing mail server.

Use these settings for outgoing mail (SMTP):

  • SMTP Server: smtp.gmail.com
  • SMTP Username: your full Gmail address (yourname@gmail.com)
  • SMTP Password: the 16-character app password you just created
  • SMTP Port: 587 (with TLS encryption) or 465 (with SSL encryption)
  • TLS/SSL: Required or Enabled

Different mail clients ask for these in different orders and use different names. Outlook might say "Outgoing Server" instead of "SMTP Server". Apple Mail might call it "SMTP". Thunderbird has a separate window just for outgoing mail. Check your app's help section if you're not sure where each field goes. The important part is that you use smtp.gmail.com as the server, your Gmail address as the username, and your app password as the password.

What to do if the app password doesn't work

If you get an error saying your password is wrong, first check that you copied the 16-character code exactly, with no extra spaces at the start or end. Paste it directly from Google's page into your mail client rather than typing it by hand.

If that doesn't fix it, make sure two-factor authentication is actually on. Go back to myaccount.google.com, click Security, and look for the green checkmark next to "2-Step Verification". If it's off, the app password option won't work at all.

If two-factor authentication is on but you still can't find the app password option, wait a few minutes and refresh the page. Sometimes Google takes a moment to show new options after you turn on two-factor authentication.

If your mail client keeps rejecting the password even though it's correct, try changing the port from 587 to 465, or switch from TLS to SSL. Some networks and mail clients work better with one or the other.

Managing and deleting app passwords

You can create multiple app passwords — one for your phone, one for your tablet, one for your work computer. Each one works independently. If you lose a device or stop using a mail app, go back to myaccount.google.com, click Security, click App passwords, find the password you want to remove, and click the trash icon next to it. That password stops working when ready, but your main Gmail password and your other app passwords stay the same.

If someone else uses your computer, you can delete that computer's app password so they can't access your email anymore. Your main Gmail password never changes, so you don't have to worry about them getting into your photos or documents.

Frequently Asked Questions

Can I use my regular Gmail password as my SMTP password?

No. Gmail requires an app password for mail clients and third-party apps. If you try to use your regular password, the connection will fail. The app password is a separate 16-character code you create in your Google Account settings.

What if I don't have two-factor authentication turned on?

You won't be able to create an app password. Go to myaccount.google.com, click Security, find 2-Step Verification, and turn it on. Google will send a code to your phone to confirm. Once it's on, the app password option will appear in your Security settings.

Do I need a different app password for each device?

You don't have to, but it's safer to create one per device. That way, if one device is lost or stolen, you can delete just that password without affecting your other devices. You can create as many app passwords as you need.

What port should I use, 587 or 465?

Port 587 with TLS encryption is the standard and works with most mail clients. Port 465 with SSL encryption also works but is older. If one doesn't work, try the other. Your mail client's help section usually recommends which one to use.

What happens if I forget my app password?

You can't recover it — Google doesn't store it where you can see it again. Go back to myaccount.google.com, click Security, click App passwords, select the device, and click Generate to create a new one. Delete the old password if you want to clean up your list.