How to use Google SMTP server
Introduction
One of the lesser-known features of Gmail and Google Apps is Google’s portable SMTP server. Instead of having to manage your outgoing email server on your DigitalOcean Droplet or Kubernetes Cluster, you can configure Google’s SMTP server settings with any script or application you want to send email from. All you need is (i) a free Gmail account or (ii) a paid G Suite account.
Note: Starting June 22, 2022, DigitalOcean will be blocking all new SMTP accounts. As part of this new policy, we have partnered with SendGrid so that our customers can continue to send email with ease. You can learn more about this partnership and get started using SendGrid by checking out our SendGrid DigitalOcean Marketplace app.
Benefits
You can have Google store and index the emails you send through your SMTP server, so all your sent emails are searchable and backed up on Google servers. If you also use your Gmail or G Suite account for your incoming email, you'll have all your emails in one convenient place. Also, since Google's SMTP server doesn't use port 25, it reduces the chance that an ISP might block your email or mark it as spam.
Settings
Google's SMTP server requires authentication, so here's how to set it up in your email client or app:
Note: According to Google, consider checking the security rating of your email client or app before you get started. If you're using an app that Google doesn't consider secure, you'll be blocked from using it unless you enable Less Secure Apps (a security setting Google doesn't recommend) or create an app-specific password. For more security information, visit this link to determine the best approach for your email client or app.
SMTP server (i.e. outgoing email server): [smtp.gmail.com (http://smtp.gmail.com)
SMTP username: Your full Gmail or G Suite email address (for example, [email protected] or example@your_domain)
SMTP Password: Your Gmail or G Suite email password
SMTP port: 465
SMTP TLS/SSL required: Yes
In order for Google to automatically copy your sent emails to the Sent folder, you need to verify that IMAP access is enabled for your account.
To do this, go to Gmail settings and click on the Forwarding and POP/IMAP tab. Go to the IMAP Access section and make sure that IMAP access is enabled for your account.
Note: If the email address used in the mailing list is not an address in your Gmail or G Suite settings, Google will automatically rewrite the From line of any email you send through the SMTP server to the default email address associated with the account. You can verify the list by going to the Accounts and Import tab on the Settings page.
You should be aware of these nuances because they affect the appearance of your email from the recipient's perspective and may also affect the Reply To settings of some programs.
Sending restrictions
Google limits the amount of email a user can send through its portable SMTP server. This limit limits the number of messages sent per day to 99. The limit is automatically lifted 24 hours after the limit is reached.
Result
You can now use Google's SMTP server.









