Using Gmail SMTP to Send Emails For Free

Last Updated : 22 Apr, 2026

Sending emails directly from your website, application, or custom software is a common requirement for modern digital products. For small-scale use cases, Gmail’s SMTP server provides a simple and free way to send emails without relying on paid third-party services.

Important Security Changes

Due to updated security policies by Google, Gmail SMTP no longer supports traditional password-based login.

To use Gmail SMTP, you must:

  • Enable 2-Step Verification (2FA)
  • Generate a 16-character App Password
  • Use the App Password instead of your Gmail password

The “Less Secure Apps” feature was fully removed in 2025, making App Passwords mandatory for SMTP access.

Generate a Gmail App Password

Step 1: Go to your Google Account → Security

1--Select-Security

Step 2:

  • Enable 2-Step Verification (2FA)
  • Navigate to App Passwords

2--Click-App-Password

Step 3: Select:

  • App: Mail
  • Or choose “Other” and name it( e.g., Smtp test)

3--Sample-Name-&-Click-Generate

Step 4: Click Generate

Note: Copy the 16-character password (it will not be shown again)

Configure Gmail SMTP

In your website, app, or CMS (e.g., WordPress SMTP plugins), enter:

  • SMTP Host: smtp.gmail.com
  • Port: 587
  • Encryption: TLS
  • Username: Your Gmail address
  • Password: Generated App Password
  • From Email: Same as your Gmail address

After configuration, send a test email to verify everything is working correctly.

SMTP Configuration Table

Use the following settings to configure Gmail SMTP in your application:

FieldRecommended Value
SMTP Serversmtp.gmail.com
Port587 (TLS) (recommended)
Alternative Port465 (SSL)
SecurityTLS (STARTTLS) / SSL
UsernameYour full Gmail address
PasswordApp Password (not Gmail password)
From EmailSame as Gmail address
AuthenticationRequired
  • Use Port 587 with TLS (STARTTLS) for best compatibility and security
  • Use Port 465 with SSL only if TLS is not supported by your tool
Comment