Long story short is I need to get an SMTP server setup inside a client's network that I can send emails out of. This thing won't need to receive emails ever, and really only needs 1 email account customercare.

What can I do? Will I have to have the networking company open a port in the firewall? Is there one built into Microsoft Server 2003?

Long story: client paid networking company to move their website in house. Now I have to figure out how to email out from their website even though they don't have an SMTP server. At least until I install one.

Their email is hosted with Gmail right now (the client's domain through Google App for Your Domain). I changed my code to connect as one of their users "customercare@clientdomain.com" and send email. Worked great for about 12 hours.

All of a sudden none of the automated emails are going out now, and google is sending the emails back saying that it is a permanent failure and Message Rejected. The link they direct me to, http://mail.google.com/support/bin/answer.py?answer=69585 is telling me that our emails look like spam. They aren't. They are emails we send to out clients about the status of their applications. Seriously, they are NOT spam.


ongle's got it right: you can setup Gmail as a smarthost for your SMTP IIS Virtual Server this way:


This also works with an XP machine with IIS 5.1's SMTP Service installed (just tested it with my machine).

Note: if you haven't already, I would recommend creating a customercare@clientdomain.com email user in gmail and use that as your SMTP credentials to authenticate with gmail because gmail will ignore what you put in the from: header and rewrite it as the authenticated user (by default anyways, I don't know if you can change that).

As for firewall changes, unless the networking company has egress (outbound) firewall filtering going on, you won't need to open any ports as 587 is usually permitted on even residential connections.

To check this mailbox, I would recommend having the client's customer service staff POP or IMAP that account or simply setup forwarding to another address that's in use/checked.

  • So close! I followed all those instructions, changed my code to pickup the delivery location from IIS, then realized the SMTP service wasn't started. Tried to start it and...nothing. Won't start. Tells me to look in the event log for error information, and nothing in there seems to relate...thanks for the advice, though. – Matt Dawdy Mar 9 '10 at 4:11
  • Do you have something else listening on that same port? do a netstat -aon | find ":25" and see. – gravyface Mar 9 '10 at 4:36
  • also check the event log for event sources of smtpsvc – gravyface Mar 9 '10 at 4:37
  • Actually, turned out that someone had disabled the smtp service. I set to auto and started it, and the service started up. Now, the solution doesn't seem to work, though. but I feel that I'm closer. I think it is getting to google, but being denied. – Matt Dawdy Mar 9 '10 at 4:55
  • Nevermind! It just started working. I must not have waited long enough. Thanks for all of your advice. – Matt Dawdy Mar 9 '10 at 5:01

You can use IIS to setup a SMTP server internally that relays its email to a smart external email server, but that may not be your real problem. It would however give you a central point of administration for sending mail from your server(s).

To help let the mail server know you are authorized to send the mail, you can create an SPF record in your DNS configuration. This lets mail servers know that your address is authorized to send email on your behalf.

If you can't get it to work, you can also use a provider like AuthSMTP to send email from places that are on spam lists.


In addition to what ongle has suggested, rather than configure a smarthost (which may not be available to you), add a remote domain with an adress space of *.com and set the option that incoming email can be relayed to this remote domain. That way email being sent through the SMTP server to any recipient with a user@domain.com email address can be delivered. Create remote domains for any other gTLD that you'll be sending email to (.net, .edu, etc.).


In addition to what's already been said, you need to ensure the various related items, such as your SPF record are set up correctly. I believe Gmail is quite fussy about such things.

  • +1 for this regardless of smarthosting. – gravyface Mar 9 '10 at 4:34

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.