Skip to content

Instantly share code, notes, and snippets.

@paultyng
Created August 2, 2012 13:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save paultyng/3236880 to your computer and use it in GitHub Desktop.
SES Setup for IIS Relay

Instructions taken from Amazon's docs and modified as necessary.

1. Install stunnel:

  • Download from stunnel's download page
  • Run installer w/ default options, create self signed cert by answering questions
  • Open the c:\program files (x86)\stunnel\stunnel.conf file in notepad
  • Clear all the server configs (under Example SSL server mode services section, won't have a client = yes line)
  • Create a new client config:
[smtp-tls-wrapper]
accept = 127.0.0.1:2525
client = yes
connect = email-smtp.us-east-1.amazonaws.com:465
  • Start stunnel.exe and ensure no errors are reported (you will get a little systray icon)
  • If it succeeds you can optionally install as a service, by running stunnel.exe -install at command line (note this installs the service but doesn't start it, so start it)
  • Test the connection, at cmd line run telnet localhost 2525 and you should see an SMTP response from Amazon's server (if telnet isn't installed, add the feature in Server Manager / Features / Add Feature)

2. Configure IIS SMTP

  • Set Smart Host as [127.0.0.1] (include the brackets)
  • In the Outbound Connections section, set outgoing port to 2525 (like the stunnel.conf file)
  • In the Outbound Security section, set authentication information to your Amazon SMTP credentials, set it to basic authentication (NOTE: DO NOT CHECK THE TLS CHECKBOX)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment