Using GMail as Your SMTP Gateway

Did you know that if you have a GMail account, you can use their mail system's SMTP service for free?  I am using it to deliver "Contact Me" messages from my blog to my account at GMail, but you can send emails to anyone using it.

Here's how to configure your email client (or server email component) to use GMail for outbound mail delivery:

    1. Set the software's SMTP server to smtp.gmail.com
    2. Enable authentication for the connection, and enter your gmail account credentials (GMail's SMTP service only works with clients that support authenticated connections, so if your software doesn't support authentication you need to use another client to use this feature of GMail)
    3. Select TLS or SSL (this will encrypt the connection)
    4. Set the port number to either 465 or 587

That's all there is to it.  Now you don't need to prop up (and secure) some MTA software on your web server just so you can send an email.

Oh, an important note:  Google will rewrite your "From:" (and Reply-To) address to whatever account you have configured to use for authentication.  You can massage this a little bit by changing the "Default account" setting within your GMail account profile (it will always rewrite the From address to match the default account).  If you are looking for an anonymous remailer, you will need to look elsewhere.

Print | posted @ Monday, January 26, 2009 9:12 PM

Comments on this entry:

Gravatar # re: Using GMail as Your SMTP Gateway
by Dave Howe at 1/28/2009 10:16 AM

There is one further "feature".
if you add as a secondary address in gmail your non-gmail account, gmail will allow you to send mail as being "from" that address without rewriting it.

unfortunately, it *will* add a "sent on behalf of" header, which a lot of mailers will interpret and display in place of the from, or will use as a reply-to address.
  
Gravatar # re: Using GMail as Your SMTP Gateway
by yayi at 8/24/2009 11:29 PM

we can omit that "sent on behalf of" now. check gmail help for further detail.
  
Gravatar # re: Using GMail as Your SMTP Gateway
by vamsi krishna at 11/15/2009 3:09 AM

Hi, do you know any solution that does not change back the from address
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 3 and 7 and type the answer here: