How to Set Up SMTP Using Google App Passwords

Setting up SMTP for sending emails through your application? If you’re using Gmail, you’ll need to enable App Passwords (especially if you have 2-Step Verification enabled). Follow these simple steps:

 Step 1: Enable 2-Step Verification

  1. Go to your Google Account Security settings. 
  2. Scroll down to “How you sign in to Google.” 
  3. Click 2-Step Verification and follow the prompts to activate it. 

Note: You must have 2-Step Verification enabled to access App Passwords.

Enable 2-Step Verification

 Step 2: Generate a Google App Password

  1. After 2-Step Verification is enabled, go back to the Security settings. 
  2. Under “Signing in to Google”, select App Passwords. 

Google App Password

 

  1. In the Select App dropdown, choose Other (Custom name). 
  2. Enter a name like SMTP Setup and click Generate. 
  3. Copy the 16-character App Password that appears. (No spaces—just the full string.) 

This is your new SMTP password. Use it with your full Gmail address when configuring email in your app.

Google App Password

 Step 3: Use App Password in SMTP Settings

  • SMTP Server: smtp.gmail.com 
  • Port: 587 (TLS) or 465 (SSL) 
  • Username: Your full Gmail address (e.g., yourname@gmail.com) 
  • Password: Your generated App Password 
  • Authentication Method: Normal Password 
  • TLS/SSL: Enabled

 Need to Manage or Revoke Access?

You can always revisit the App Passwords page to:

  • Revoke an old App Password 
  • Generate a new one 
  • Track what apps you’ve given access to 

 You’re Done!
Your SMTP is now securely set up using Google’s recommended method. This helps keep your email communication reliable and protected.

Share: