Session mailSession = Session.getDefaultInstance(props, null); mailSession.setDebug(true);
Verify connectivity to the MailServer with Telnet :
telnet mymailserver 25
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.
Written and compiled by Réal Gagnon ©1998-2013
[ home ]