reset password

Local Email Testing with hMailServer

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. 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.

A screen capture video illustrating this process is available here.

This page has been viewed 42086 times.