Jul 25

JavaMail can be frustrating when it does not work, even worse when it works on one box but not on another. The following are t a few things to try and track down the cause of your problems.

Enable debug logging

This can be done in your code:
or on the command line:
java -Dmail.debug=true au.com.object.MyMailApp

Use telnet to test connections to mail servers (smtp, pop, imap)

This is useful for telling us if it’s a server or network problem. If telnet can connect ok, then so should your application. For example to test connection to a pop server

telnet mail.example.com 110

If you’re trying to connect to an SMTP server, use 25 instead of 110 for the port number. If you’re trying to connect to an IMAP server use 143 for the port number.

Let us know if you know any other techniques for debugging JavaMail problems.

written by objects \\ tags: ,

Apr 05

Writing to the Firebug console can be done using
console.log("Hello World");

As well as a log() method there are also debug(), info(), warn() and error() methods which the log message gets suitably color coded in the Firebug console.

The methods all support printf style formatting

console.log("Received %d messages", messageCount);

written by objects \\ tags: , , ,