Bookmark and Share Subscribe Bookmark and Share

Categories

Advertisement

Statistics

  • 3176This post:
  • 135335Total visitors:
  • 456Visitors today:
  • 8126Visitors per month:


How to Configure IIS SMTP Server to forward emails using a Gmail account

Jul
16

 « »    

This is very useful when you want to test outgoing email for an application but not have access to an SMTP server. This is great for many applications including SQL Reporting Services, SharePoint and any other application which allows you to set an email/smtp server.

Prerequisites

1. Create and setup a Gmail account at http://www.gmail.com

2. Enable the Gmail account for POP3 in Gmail, you can follow the instructions on how to do this here: http://mail.google.com/support/bin/answer.py?answer=13273&cbid=wl8yzeug2lob&src=cb&lev=topic

3. Install the mail server role in IIS6 or IIS7. This should include both “POP3″ and “SMTP” – you read more about this installation here: http://www.jppinto.com/2009/02/installing-iis-70-with-smtp-on-windows-server-2008/

Configure SMTP

We will now configure the IIS Server to forward messages using the Gmail account.

Open IIS Manager

Right Click “IIS SMTP Virtual server”

Select “Properties”

Select the “Access” Tab

Click “Relay”

Make sure “All except the list below” is selected

You can add servers to this list that you want to block from sending mail to this server if you press “Add…”

Press “OK”

Select the “Delivery” Tab

Press “Outbound Security…”

Select “Basic Authentication”

Enter your Gmail account (i.e. your_acccount@gmail.com)

Enter your Gmail password

Select “TLS encryption”

Press “OK”

Press “Outbound connections…”

Set TCP port to “587″

Press “OK”


Press “Advanced…”

Enter the Full-quailified domain name – this should be what you want this SMTP server to be called. If your server name is “SMTP” and your domain is “YOURDOMAIN.COM” then the entry should be “smtp.yourdomain.com

Enter “smtp.gmail.com” as the “Smart host”

Press “OK”

Now configure the outbound email server in your application to use “smail.yourdomain.com” and it should relay the email through Gmail.


 


 


 


 


 

  




    Did I save you time and headaches? Buy me a cup of coffee.
    The more coffee I drink the more articles I can write.

    Donation Type:
    


7 Comments so far

  1. Very needed post! I am very thankful to you for sharing this post.

    • akira6968 said:
    • Posted on December 12th, 2012 at 8:50 pm
    • Reply
    • Permalink

    Holy crap thank you so much :)

    • Steve Fleurant said:
    • Posted on April 18th, 2011 at 9:49 am
    • Reply
    • Permalink

    I like your post, I've been trying to send email to lotus account from sharepoint for one week now and it is not working, I can't get it to work. I try to use similar settings than for the gmail account. But still it is not working…

    • Timothy said:
    • Posted on March 15th, 2011 at 10:23 pm
    • Reply
    • Permalink

    Well I’m back…but I dunno man…Microsoft sucks, nothings simple….relaying worked, but it has my gmail account on it and I can’t use this for different websites because it has to come from each domain? Should I just ditch Microsoft and use a proper SMTP server that isn’t ass backwards??

      • jppinto2010 said:
      • Posted on March 17th, 2011 at 7:16 am
      • Reply
      • Permalink

      Gmail did allow this at one point. I think they stopped doing this so they would get less spam. I have switched over to using my ISP's smtp server which allows relaying with an alias.

    • Timothy said:
    • Posted on March 15th, 2011 at 10:01 pm
    • Reply
    • Permalink

    Do you mean how to send email without using GMail? I too would like to know that. The issue with relaying through Gmail is that all the emails have a from address of your gmail account. I am yet to try it, but I think this is going to cause problems for different websites with different domains. Will soon see. I will endevour to report back when I find out.

    • Taron said:
    • Posted on November 18th, 2010 at 10:56 pm
    • Reply
    • Permalink

    How delivering e-mail without GMail account? From itself!

Leave a comment

Trackbacks on this post