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
- Go to your Google Account Security settings.
- Scroll down to “How you sign in to Google.”
- Click 2-Step Verification and follow the prompts to activate it.
Note: You must have 2-Step Verification enabled to access App Passwords.

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

- In the Select App dropdown, choose Other (Custom name).
- Enter a name like SMTP Setup and click Generate.
- 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.

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.