Gmail SMTP Settings

Types of accounts and their SMTP settings

Setting up SMTP for Gmail

Account types and how to set up SMTP for each one
As of August 2017, 1.2 billion people were actively using Gmail, making it the most popular email service. There are two kinds of accounts. We offer both regular Gmail accounts and G-Suite accounts, which are used by businesses to give their employees their own Gmail accounts.

Case in point: John works for a company called ABC, and his email address is [email protected]. The company owns and manages his account. They are called Restricted Gmail Accounts, and they have rules set by their G-Suite supervisor about how they can use Gmail.

To set up SMTP for any type of Gmail account, here are the steps:

Gmail SMTP Settings

  • Server Address : smtp.gmail.com
  • Username : Your Gmail Address (e.g. [email protected])
  • Password : Your Gmail Password
  • Port Number : 587 (With TLS)
  • Alternative Port Number : 465 (With SSL)
  • Internet Protocol : Dynamic IPs Allowed
  • Sending Limits : A registered G Suite user can’t relay messages to more than 10,000 recipients per day.

G-suite relay SMTP Settings

  • Server Address : smtp-relay.gmail.com
  • Username : Your Gmail Address (e.g. [email protected])
  • Password : Your Gmail Password
  • Port Number : 587 (With TLS), 465 (With SSL) and 25 (with TLS/SSL)
  • Internet Protocol : One or more static IP addresses are required.
  • Sending Limits : 2,000 Messages per day.

Restricted Gmail SMTP Settings

  • Server Address : aspmx.l.google.com
  • Username : Your Gmail Address (e.g. [email protected])
  • Password : Your Gmail Password
  • Port Number : 25 (TLS not required)
  • Internet Protocol : Dynamic IPs allowed
  • Restriction : Email can only be sent to Gmail or G Suite users.
  • Sending Limits : Per user receiving limits apply. This option restricts sending messages to Gmail or G Suite users only.

A new level of safety called "Less secure apps"

  • A new layer of security has been added to Gmail accounts by Google to make them safer. Some third-party servers try to read or log into your Gmail account, but Google servers stop them if their security isn’t as good as Google’s.
  • So, before you start setting up, make sure that the Less Secure Apps option is turned on for the Gmail account you want to use.
  • Most of the time, you shouldn’t turn on the “Less Secure Apps” choice because it can put your Gmail account at risk. Because of this, it is best to use this when you have no other choice.
  • You can use this link to make apps less secure. This is how it will look:
gmail-smtp-setting
  • There’s one more catch. For safety reasons, you won’t be able to turn on “Less Secure Apps” if you have Google’s “Two Step Verification” process turned on for your Gmail account.
  • The “Less Secure Apps” page will look like this if the “Two Step Verification” choice is turned on:
gmail-smtp-setting

You will need to turn off “Two Step Verification” for your Gmail account in order to use “Less Secure Apps.” After that, it’s easy to turn on the “Less Secure Apps” choice.

FAQ

1. What are the Gmail SMTP server settings?
  • SMTP Server Address: smtp.gmail.com
  • SMTP Port:
    • 587 (for TLS/STARTTLS)
    • 465 (for SSL)
  • Username: Your full Gmail email address (e.g., [email protected])
  • Password: Your Gmail account password or an App
  • Password if you use two-factor authentication (2FA)
2. What are Gmail POP and SMTP settings for gmail?
  • Gmail POP (Post Office Protocol): Used for downloading emails from Gmail’s server to your email client. POP allows you to access and manage your emails offline.
  • Gmail SMTP (Simple Mail Transfer Protocol): Used for sending emails from your email client through Gmail’s server.
3. How can I use Gmail’s SMTP server in a Python script?

To use Gmail’s SMTP server in a Python script, you need to configure the SMTP settings and use the smtplib library to send emails. Here’s a basic setup:

  • Import necessary libraries: smtplib for SMTP and email for constructing the email.
  • Configure SMTP settings: Set the server address, port, and credentials.
  • Send the email: Use smtplib.SMTP to connect to the server, authenticate, and send the email.
Schedule a Demo floating-button-arrow