Real'sHowTo AddThis Feed Button
Custom Search

Debug a Javamail ProgramTag(s): Networking


Set the Javamail DEBUG mode "on" :
Session mailSession = Session.getDefaultInstance(props, null);
mailSession.setDebug(true);
This setting puts the Javamail classes in verbose mode to System.out.

Verify connectivity to the MailServer with Telnet :

telnet mymailserver 25
for example, you can detect if your firewall is blocking your connection.

Use a Javamail server mock-up to act as "in-memory" mail server :
See https://mock-javamail.dev.java.net/ and http://quintanasoft.com/dumbster/. These mock-ups are designed to act a mail server but the actual email is not delivered to the mail recipient which can be useful in a testing stage.


blog comments powered by Disqus


If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2013
[ home ]