When testing and/or developing with SharePoint it is helpful to test and use e-mail functionality. You might be working on a workflow or want to demonstrate alerts to potential stakeholders, and it would be nice to do this in your testing environment. The problem is that traditionally Exchange is used for this activity, and when you’re in a testing environment adding the bloat of Exchange to an environment that is already nearly maxed isn’t an option. Enter hMailServer.
hMailServer is a full featured e-mail server, but we’re just going to use it for e-mail relay (SMTP) (I found a post with supposedly a VB script for specifying the drop folder for incoming e-mail but haven’t worked with it). This is also only a good idea for testing purposes. While I don’t see why hMailServer cannot be used for deployments (albeit small ones) it still isn’t advisable. Most likely if you’re implementing SharePoint in your enterprise then you’re already drinking the Exchange juice so just use that.
Installing and Configuring hMailServer
1. First you’ll want to download hMailServer.
2. Start the install.
3. Move through the prompts, but choose full installation when asked.
4. It will then bring you to a screen asking you about the database to use. Since we’re already running SQL Server for SharePoint let’s use that so select “External Database Engine.” (Clicking the images will magnify them.)
5. After finishing the install it will open up a database wizard. The first option we’re giving is the database instance. Select the option to create a new hMailServer database.
6. Then it will ask for information to connect to your database instance. The database server address is most likely your computer name (contoso for me), and then choose whatever you want to call the database. Lastly, choose the Windows authentication option for authentication mechanism (most likely the account you’re using has the dbowner role on SQL Server but if not add it).
7. Then you will be prompted to select the service instance. Select the SQL Server (MSSQLSERVER) service.
8. Move through the next screens (it will provision the database), and then lastly you will be prompted to specify a password for the admin account. Add one and finish the wizard.
9. Next it will open the hMailServer administrative interface. Login and expand the following nodes: Settings — Advanced — IP Ranges. Highlight My computer. Then specify 0.0.0.0 as the Lower IP and 255.255.255.255 as the Upper IP.
10. Now click on Domain in the navigation panel. Here you’ll add a domain. I chose my computer name (with a .com suffix), and then click advanced and specify a catch-all e-mail address. You can then exit the hMailServer administration interface.
11. Next open Central Administration. We will now specify the outgoing e-mail settings by clicking on the System Settings header on the splash page and then choosing “Configure outgoing e-mail settings.”
12.For the “Outbound SMTP server” put in your computer name, and I put in my catch-all e-mail address for the “From address” and “Reply-to address.” Save your change.
13. Lastly, I tested it by adding a user to a site with an e-mail specified in AD, and it worked!