Saturday, 30 March 2013

How To Setup Own Mail Server For Your Application

There are plenty of mail servers available in the market for free, hmailserver, apache-james.. are some of them. In the following post, I am going to write about configuring mail server(apache-james 2.3.2) on your own machine. This might be useful for developers to test their application in the restricted environment.
(For simplicity, I am ignoring configuration settings, and going to write about main steps, for more info you can read in apache-james site).
  1. Download apache-james 2.3.2 and unpack on your machine(Here after james-2.3.2 folder will be referred as JAMES_HOME.
  2. Go to JAMES_HOME\bin and click on run.bat, if the mail server runs successfully, following screen can be seen
    .
  3.  You are almost there. To test whether you have configured your mail server properly, open command prompt and try this command. telnet localhost 25, then you can see a scree like this.
  4. Now use out going smtp server as localhost or 127.0.0.1 and port as 25. (You can modify these details in conf.xml and host file). 
  5. Send a mail from your application and check your out box/inbox here.
    JAMES_HOME\apps\james\var\mail\inboxes
    JAMES_HOME\apps\james\var\mail\outgoing
Done. 
          

No comments:

Post a Comment