Create Email Server on Windows WAMP
roundcube wampSetting up a local email server helps in testing email deliveries and creating email templatings. Learn how to setup an email server on windows using
WAMP and integrate it with a webmail interface. It may help in testing
debugging your scripts dealing with mail functions.

You will need following for this setup:
- hMailServer. Download hMailServer
- Roundcube. Download Roundcube
First of all enter two host enteries in V-Hosts file of WAMP. First one for main domain and second one for webmail interface. The file can be found at the following location on windows.
C:\wamp\bin\apache\Apache2.2.11\conf\extra\
<VirtualHost *:80> DocumentRoot "c:/wamp/www" ServerName testdomain.com ServerAlias www.testdomain.com </VirtualHost> <VirtualHost *:80> DocumentRoot "c:/wamp/www/roundcube" ServerName mail.testdomain.com ServerAlias www.mail.testdomain.com </VirtualHost>
You will have to add an entry to windows hosts file for above virtual hosts. The windows hosts file can be found on the following location on windows.
c:\windows\system32\drivers\etc\
I am sure you know how to install WAMP and get it running. I am going to show you the rest two steps hMailServer and Roundcube webmail interface. After you have downloaded both follow these steps to install hMailServer.
Install & Configure hMailServer:
- Run the setup of hMailServer you downloaded.
- Click "Next".
- Check "I accept the agreement" and click "Next".
- Set the destination folder where you want to install hMailServer and click "Next".
- Select components you want to install check both and click "Next".
- Check "User built-in database engine" and click "Next".
- Click "Next".
- Set the password you will need this password to connect to server. Click "Next".
- After all above steps click "Install" to continue installing hMailServer.
1. On welcome screen click on domains on left side navigation panel and then click on "Add" on top right buttons.

2. Enter a domain name in our case for this tutorial I am using "testdomain.com". Click Save.

3. Click on Accounts on left side navigation panel and then click on "Add" on top right buttons.

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

Configure Roundcube:
1. Extract the roundcube files you have downloaded to "www" directory in WAMP and rename it to "roundcube".2. Open a browser and enter the url "localhost/roundcube/installer"
3. On the first screen you will see the status of environment normally its all good at this step you just have to click "Next".

4. On next page you don't have to change all just enter database host, database name, username for database and password in "Database Setup" section. Also enter the host for SMTP server in "SMTP Settings" section. Click "Create Config".

5. This is final step you will see the "Test Config" page. Click on "Initialize Database" and all done.
Now open "mail.testdomain.com" in any browser and you will see the following page.


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 firewall or change the "Require SMPT Authentication in hMailServer Administrator Panel ➞ Settings ➞ Advanced ➞ IP Ranges ➞ My Computer "