Setting Up hMailServer for
Local Email Testing
hMailServer
is a free email server for Windows. It supports SMTP, POP, and IMAP.
This document describes a simple setup using hMailServer for testing
the email functions of your web application locally. A screen capture video is available to demonstrate the process. If you own a
static IP address and a domain name, and want to set up a proper email
server for regular usage, i.e. sending and receiving email via the Internet,
please check out the hMailServer
documentation.
Download hMailServer from http://www.hmailserver.com/
During installation, choose
- Full installation
- Use built-in database engine
- Run hMailServer Administrator
In hMailServer Administrator:
- Add a domain localhost.localdomain
.
- Add a catch-all address (Domain -> localhost.localdomain
-> Advanced
-> Catch-all
address) , e.g. cysun@localhost.localdomain.
If an email is sent to this domain but the address of the email does
not match any existing account under this domain, the catch-all address
will get this email.
- Add an account, e.g. cysun@localhost.localdomain
.
- Under Settings
-> Protocols
-> SMTP
-> Delivery of
e-mail, specify the host name to be localhost .
- Under Advanced
-> IP Ranges,
delete Internet.
This
step is a safety measure to ensure that your email server will only be used locally.
After setting up hMailServer, you can try using an
email client to send and receive email from this email
server. Check out the hMailServer installation video for an
example
of using Outlook Express.
To test CSNS email functionality, don't forget to modify mail.smtp.username
and mail.smtp.password
in build.properties
so they match the account you created under hMailServer.