Friday, January 11, 2013

Local SMTP Testing

Setting up SMTP server on local windows machines for web services is a pretty simple task.  In Windows 2008 you have to remember to install IIS 6.0 tools to be able to manage the SMTP instance.

The issue I have been working with is just to make sure the SMTP server is actually sending out information. You can test it by using Telnet (which is not installed by default)

  1. From the command prompt, type: telnet localhost:25
  2. type: EHLO and press enter
  3. type: AUTH LOGIN if you are using credentials and enter the appropriate information
  4. type: MAIL FROM:somesender@somedomain.com (the mail address you are sending from)
  5. type: RCPT TO:somesender@somedomain.com (the mail address you are sending to)
  6. type: DATA Enter the information you want to have in the body of the message.
  7. Press Enter and type a single period (.)
If mail is working properly you will get a 250 2.6.0 infomration message and an email in your inbox.