I am writing a program that sends emails. It works on production where email server is setup. In my program I have localhost as the mail.smtp.host. I would like this program to work on the tomcat server installed on my desktop so I can debug and make some changes. Is there any way I can use some other smtp servers (like smtp.gmail.com) to send emails so it works on my development environment? Or is there any way I can install and use something like Java E-mail Server or any other email servers on my localhost. Any suggestions highly appreciated. Thank you very much.
Tomcat is a Web Server with its main functionality as Servlet container. If you are looking for SMTP services, then you might need to configure mail server for these services. Take a look at Apache's james server.
Thanks for all the posts. It is very encouraging. I downloaded James and going thru the documentation. The configuration section says: "James needs to have access to a DNS server for domain resolution. The out of the box configuration assumes that there is a DNS server on localhost." But I don't have a DNS server on my localhost. What to do? Any suggestions appreciated.
I am having trouble setting up james server. I am able to startup the server. I am able to create users. I am getting the following message when I startup: James Mail Server 2.3.1 Remote Manager Service started plain:4555 POP3 Service started plain:110 SMTP Service started plain:25 NNTP Service started plain:119 FetchMail Disabled
When I am trying to telnet james I am getting the following message: C:\>telnet james-server 25 Connecting To james-server...Could not open connection to the host, on port 25: Connect failed
Anybody know what is wrong?
Given below is my dns server and servernames configuration: <dnsserver> <servers>
</servers> <!-- Change autodiscover to false if you would like to turn off autodiscovery --> <!-- and set the DNS servers manually in the <servers> section --> <autodiscover>true</autodiscover> <authoritative>false</authoritative>
<!-- Maximum number of entries to maintain in the DNS cache --> <maxcachesize>50000</maxcachesize> </dnsserver>
I did follow the exact same doc. But when I do telnet localhost 25 I am not getting the result explained in the document. Instead this is what I am getting 220 machneName SMTP Server (JAMES SMTP Server 2.3.1) ready Mon, 1 Oct 2007 16:03:29 -0400 (EDT)