Setting up a local email testing server
If you do any sort of web development, you are likely going to run into situations where you need to have your web application send email. While the process of setting up your server-side script to send the email isn't difficult, testing it can be. In the past, I have always simply uploaded the script(s) to my web host and tested it live. While that worked fine for my development projects (although it was always a hassle), it didn't work so well in classes.
I finally decided that the topic was important enough to do a little research and see if there was a way that I could set something up on a local machine to test sending email, and it turns out that it was almost ridiculously simple. A quick Google search for "free SMTP program" brought up a bunch of results; I'll be using a program called, strangely enough, Free SMTP Server. I think it was the first or second hit on Google, but I found something that worked for what I needed so I didn't bother investigating any further.
Once you have the program downloaded and installed, you're pretty much done. Go into the configuration settings for your language of choice. If you use ColdFusion, open up the ColdFusion Administrator and go to the Mail page. If you're a PHP person, open up php.ini. Either way, simply make sure that the mail server is set to "localhost" and the port is 25.
That's it. (Well, if you use PHP, you need to restart your web server.) For ColdFusion, simply create a cfmail tag:
#form.body#
</cfmail>
In PHP, it'll be as easy:
$subject = $_POST['subject'];
$body = $_POST['body'];
mail($to, $subject, $body);
Note that while this is a great solution, it only sends the email - it doesn't receive it. That's because SMTP is only for sending mail. Receiving it requires an POP server, and that's a whole different ballgame. However, as long as you use a real, valid email account in the "to" field, you should be able to test this with no problems.

