1

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:

http://forums.iis.net/t/1158540.aspx

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?

Ben Mills
  • 1,163
  • 2
  • 8
  • 9

1 Answers1

3

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

Glorfindel
  • 1,213
  • 4
  • 15
  • 22
Adam Brand
  • 6,127
  • 2
  • 30
  • 40
  • 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