Create an Email Server on Windows WAMP
An email server on Windows WAMP is a locally installed and configured mail system that handles sending and receiving emails using SMTP, IMAP, and POP3 protocols. Learn how to set up an email server on Windows WAMP and integrate it with a webmail interface.

In this post, we will install a mail server hMailServer to manage email delivery and add a webmail client Roundcube to access emails through a browser. The hMailServer will serve as the Windows SMTP server, whereas Roundcube will serve as the webmail client for our Windows email server. Before we begin, we will need to download the email server and webmail interface from the following links:
hMailServer is an open source, free email server for Microsoft Windows with support for IMAP, POP3, and SMTP, which handles the mail delivery on a local machine. It comes with additional sound features that an email server should have.
Roundcube is an open source webmail client written in PHP that uses AJAX on the client side. Which means it requires JavaScript to be enabled on the client browser. It comes with many UI skins, multi-language support, and a lot more.
Firstly, we need to enter two host entries in the V-Hosts file of WAMP. First one for the main domain and the second one for the webmail interface. The file can be found at the following location on Windows. For more details on how to set up these virtual hosts, give How to Create a Subdomain on WAMP a read.
C:\wamp\bin\apache\Apache2.2.11\conf\extra\
<VirtualHost *:80> DocumentRoot "c:/wamp/www" ServerName test-domain.com ServerAlias www.test-domain.com </VirtualHost> <VirtualHost *:80> DocumentRoot "c:/wamp/www/roundcube" ServerName mail.test-domain.com ServerAlias www.mail.test-domain.com </VirtualHost>
We will have to add an entry to the Windows
hosts file for the above virtual hosts. The Windows' hosts file can be found
in c:\windows\system32\drivers\etc\ on Windows.
Assuming you know how to install WAMP and get it running. I am going to show you the rest of the two steps: the hMailServer installation and configuration, and the Roundcube webmail interface setup. After you have downloaded both, follow these steps to install hMailServer.
Install & Configure hMailServer on Windows
- Run the setup of hMailServer you downloaded.
- Click "Next".
- Click the checkbox "I accept the agreement" and click "Next".
- Set the destination folder where you want to install hMailServer and click "Next".
- Choose the components you intend to install, check both available components, and click "Next".
- Click the checkbox "User built-in database engine" and click "Next".
- Click "Next".
- Set the password, you will need this password to connect to the server. Click "Next".
- After all of the above steps, click "Install" to continue installing hMailServer.
1. On the welcome screen, click "Domains" on the left side navigation panel and then click on "Add" from the top right buttons.

2. Enter a domain name of your choice; I am using
test-domain.com for this post. Click Save.
3. Click Accounts on the left side navigation panel and then click "Add" on the top right buttons.

4. Enter the email address and password for the account and then click "Save".

Configure Roundcube on Windows
1. Create a directoryroundcube inside www and extract the Roundcube files you have downloaded to this directory.2. Open a browser and enter
localhost/roundcube/installer URL.3. On the first screen, you will see the status of the environment. Normally, it should show an OK status for all configurations at this step; you just have to click "Next".

4. On the following step page, you do not have to change anything; just enter the database host, database name, username for the database, and password in the "Database Setup" section. Also, enter the host for the SMTP server in the "SMTP Settings" section. Click "Create Config".

5. This is the final step; you will see the "Test Config" page. Click the button "Initialize Database", and all is done.
Now open "mail.test-domain.com" in any browser, and you will see the following page.


All Done! You just created an email server and webmail interface on your local Windows machine.
NOTE: If
you are still having issues, make sure you followed all the steps
carefully. If it still doesn't work, you may need to add an exception for
hMailServer in the firewall or change the "Require SMTP Authentication in
hMailServer Administrator Panel ➞ Settings ➞ Advanced ➞ IP
Ranges ➞ My Computer".