configuring-and-using-google-smtp-app-password

Configuring and using Google SMTP App Password

If you're using Gmail with a third-party application (for example, sending emails from a website via SMTP) and you're seeing an error like "incorrect password" or "authentication failed", there's a good chance you need to adjust your account settings due to Google's recent security updates.

Google has tightened its security policies and no longer allows regular passwords to be used for accessing your Gmail account through third-party apps. To fix this, you’ll need to enable 2-Step Verification and generate a special App Password.

Step 1: Go to Your Google Account Security Settings

Visit this link: https://myaccount.google.com/security

Sign in with the Google account you plan to use for your SMTP settings.

Step 2: Enable 2-Step Verification

Scroll down to the section titled “How you sign in to Google.”

Click on “2-Step Verification” and follow the instructions to set it up.

Note for administrators (Google Workspace):

If you're using Google Workspace (formerly G Suite), 2-Step Verification might not be enabled by default for all users. In that case, you’ll need to activate it from the admin panel:

admin.google.com

Security → Authentication → 2-Step Verification → Allow users to turn on 2-Step Verification

Step 3: Generate an App Password

  1. Go back to https://myaccount.google.com/security
  2. Look for the section labeled “App passwords”
  3. Click on “Generate App Password”
  4. Choose an app and a device (e.g., “Mail” and “Custom device”), then click “Generate.”

You will receive a special 16-character password, which looks like this: abcd efgh ijkl mnop

Step 4: Use This Password in Your SMTP Settings

⚠️ Important: Do not include spaces when entering the password in your app or website.

❌ Incorrect: abcd efgh ijkl mnop

✅ Correct: abcdefghijklmnop

Use this password wherever your app or website asks for your SMTP password.


⚙️ SMTP Configuration Options

  • SMTP Server: smtp.gmail.com
  • Port: 587 (for TLS) or 465 (for SSL)
  • Encryption: TLS or SSL
  • Username: Your full Gmail address (e.g., example@gmail.com)
  • Password: App Password — the special 16-character password you generated
  • Requires Authentication: Yes
← Back to Blogs