My ASP.NET application running in IIS7 on Windows Server 2008 needs to send email. I added the SMTP feature to Windows Server 2008. The problem is that my server has multiple IP addresses and I don't seem to have any control over what IP is used for the outgoing email. Email is sent correctly, but the "Fully Qualified Domain Name" I'm using to send mail may not match the IP the server uses:


Any ideas on how I can fix this? Please keep in mind I'm mainly a programmer and only a part time sys admin.

ADDITIONAL QUESTION: What do people think about just using external SMTP servers like Google Apps SMTP servers? Are they reliable enough?


I recommend using HMailServer instead as it is free and much better (finer SMTP controls, better logging/troubleshooting tools). You can disable the POP and IMAP functionality easily.

Anyway, you should be able to change the IIS SMTP binding per below. It looks like it is for inbound, but it may also work for outbound. If not, I think it might bind to the first IP address in Windows, so you can make the IP you want to be the outbound the primary IP on your system. HMailServer will let you select the IP to bind to though.

IIS 6.0 SMTP Server

  • I've set the IP in that screenshot and it does only set the inbound IP. The outbound traffic goes out on a random IP (not the first). The IP being used doesn't seem to change, but I don't know if I can rely on that. HMailServer looks good, but I don't love the idea of installing a full email server just for the SMTP component. I see that it even installs MySql. I know this would work and may be the solution, but I'd prefer a simple standalone SMTP server. – Ben Mills Jul 20 '09 at 13:20
  • Weird. It used to (IIRC) bind to the first IP. HMailServer doesn't install MySql...it can install SQL Server Lite. Yeah you can just disable the POP and IMAP functionality of HMailServer. It's pretty lightweight as mail servers come. – Adam Brand Jul 20 '09 at 14:19

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.