I appreciate that similar questions have been asked about how to setup SMTP relaying with IIS's virtual SMTP server. However I'm still completely stumped on this problem.

Here's the setup: IIS 6.0 SMTP server running on Win2k3 box with a NAT'ed IP. Company uses Gmail for all email services. An app on the box needs to send email, so normally we'd just set the app up to talk to smtp.gmail.com directly, but this app doesn't support TLS. Easy, we just setup a local SMTP relay right? So I thought.

What we have done so far: Setup IIS SMTP server to relay to smtp.gmail.com, as per these excellent instructions: http://fmuntean.wordpress.com/2008/10/26/how-to-configure-iis-smtp-server-to-forward-emails-using-a-gmail-account/

The local SMTP relay allows anonymous access.

Both the local IP and the loopback IP have been explicitly allowed in the Connection and Relay dialogs.

Tried sending email from 2 different apps via the local SMTP server, but failed (the emails end up in the Queue folder, but never get sent). The IIS logs show the conversation with the local app, but zero conversation happening with smtp.gmail.com. The port used by gmail is open outbound, and indeed the apps we have that support TLS can send email directly via smtp.gmail.com, so there is no problem with the network.

At this point I changed the smtp settings in IIS SMTP server to use a different external SMTP server and hey-presto, the local apps can send email via local IIS SMTP relay.

So smtp.gmail.com fails to work with our IIS SMTP relay, but another 3rd party SMTP service works fine. We need to use smtp.gmail.com, so how to troubleshoot this one?

3 Answers 3


We tried going this route too, but relaying email can be quite difficult. After struggling with the Windows SMTP server for a couple months, we gave up and created an SMTP Proxy which we uploaded to CodePlex. You can use it for free and it is much simpler to use and maintain.


You need to install a packet analyzer on your network and monitor the process carefully.

  • 1
    I agree - if you have the TLS box ticked in the SMTP server config, then for some reason this isn't working right, and something like Wireshark may help you figure out why.
    – dunxd
    Jan 28, 2010 at 11:32

as dunxd said in a comment above, this sounds like an encryption issue.

Bear in mind that smtp.gmail.com does not accept submissions on port 25, and dependant on the encryption methodology it expects submissions on 587 (TLS) or 465 (for SSL).

You also need to configure the account via gmail.com to allow and external program (or server) to use its auth details for SMTP. I believe enabling POP3 or IMAP will do this.

  • We've tried ports 25, 465 and 587 for gmail smtp - no luck.
    – saille
    Feb 4, 2010 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.