Today I was asked to create a testing mail server; something that can read email from a test webapp and redirect it to another account. This allows developers to see how a test web application send/receives mail without having all the overhead of changing the settings in the database.
Installing HMailServer
Get the software from out share: \\ap-nas-isln-01\Data-WGPSN-AU-Perth\EPF\BSG\Downloads\Hmail or from the official website : http://www.hmailserver.com/index.php?page=download
Copy the install file to your server.
Run hMailServer-5.4.1-B1951.exe (or whatever version you use)
Click Next / Accept the licence agreement and click Next
Pick the default installation location (or another if needed).
Choose “Full Installation” and Click Next
Choose “External database” click Next. and Next Again
Enter an admin password (e.g. Pa55word ) and Click Next
Click Install.
Enter the password again and Click OK
Click Next
Create a “New” database on first install of choose an existing one if required. Click “Next”
I’m using SQL Server so I picked that and clicked Next.
Enter the server connection details; I used a Windows authentication account as the <DOMAIN>\<ServerName>$ account had access to the SQL Server. Click Next and Next again… Next Again to Finish and then Close.
You should see the message above.
Configuring HMailServer
First thing you’ll see will be the Admin connection window.
Double click the “Localhost” entry.
Click “Add domain”
Enter the domain name you wish to use and click “Save”.
Expand the “Accounts” node and click “Add”
Add a User and Password for testing and click Save.
Expand the “Setting\Advanced\Auto-ban” node and uncheck Auto-ban. (I do this because I’m running the system on the same machine as my webapps).
Click Save and then Exit.
Uninstalling HMailServer
Click Start/hMailServer/Installation/Uninstall hMailServer
Click “Yes” that you are sure you wish to remove the component.
Click OK.
Note: This will not remove the external SQL database (if you used one). Use SQL Manager to do that step.
Also I’d advise removing the folder from the server as the INI settings are left on the server, in case you every reinstall.
Connecting up your outlook account
Start Outlook
Choose File/Add Account and click “Manually Configure server settings” click Next.
Choose “Internet Email” and click Next
Enter the various details as required, being sure to select “IMAP” as the Account Type. Also the Username should be FDN (e.g. test@domain.com) then click : “More Settings…”
In the “Outgoing Server” tab select “My outgoing SMTP requires Authentication and select “Use same settings ad my incoming mail server”. Click OK
You should see the above if everything went well.