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 "[email protected]" 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.
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 [email protected] email address can be delivered. Create remote domains for any other gTLD that you'll be sending email to (.net, .edu, etc.).
ongle's got it right: you can setup Gmail as a smarthost for your SMTP IIS Virtual Server this way:
http://fmuntean.wordpress.com/2008/10/26/how-to-configure-iis-smtp-server-to-forward-emails-using-a-gmail-account/
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 [email protected] 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.
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.