Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 3.37 KB

google_smtp-updated.md

File metadata and controls

43 lines (29 loc) · 3.37 KB

How To Use Google's SMTP Server

Introduction

A little-known feature about Gmail and Google Apps email is Google's portable SMTP server. Instead of having to manage your own outgoing mail server on your DigitalOcean VPS, you can simply configure Google's SMTP server settings into whatever script or program you wish to send email from. All you need is either a (i) free Gmail account or (ii) paid Google Apps account.

Benefits

You have the option of having Google store and index the emails you send via its SMTP server, so all your sent emails will be searchable and backed-up on Google's servers. If you elect to use your Gmail or Google Apps account for your incoming email as well, you'll have all your email in one convenient place. Also, since Google's SMTP server does not use Port 25, you'll reduce the probability that an ISP might block your email or flag it as SPAM.

Settings

Google's SMTP server requires authentication, so here's how to set it up:

Server address
(i.e., outgoing mail):
smtp.gmail.com
Username:Your full Gmail or Google Apps e-mail address
(e.g. [email protected] or [email protected])
Password:Your Gmail or Google Apps e-mail password
Port:465
TLS/SSL required?:yes

In order to store a copy of outgoing e-mails in your Gmail or Google Apps Sent folder, log into your Gmail or Google Apps e-mail Settings and:

  1. Click on the Forwarding/IMAP tab; and
  2. scroll down to the IMAP Access section;
  3. IMAP must be enabled in order for e-mails to be properly copied to your Sent folder.
**NOTE:** Google automatically rewrites the FROM: field of any e-mail you send via its SMTP server to the default Send mail as e-mail address in your Gmail or Google Apps e-mail account *Settings*. You need to be aware of this nuance because it affects the presentation of your e-mail, from the point of view of the recepient, and it may also affect the Reply-To setting of some programs.

Workaround: In your Google e-mail Settings, go to the Accounts tab/section and make "default" an account other than your Gmail account. This will cause Google's SMTP server to re-write the FROM: field with whatever address you enabled as the default Send mail as address.

Sending Limits

Google limits the amount of mail a user can send, via its portable SMTP server. This limit restricts the number of messages sent per day to 99 emails; and the restriction is automatically removed within 24 hours after the limit was reached.

Additional Resources

As always, if you need help with the steps outlined in this How-To, look to the DigitalOcean Community for assistance by posing your question(s), below.

Article submitted by: Pablo Carranza • Updated 12/10/2013