It's easy to send mail from your Java app using the standard
Javamail package. For the most basic case (no authentication) the
code is short and simple. Unfortunately the situation changes if you
need authentication. This is largely because different mail servers do
things in slightly different ways. In this short note, which includes links to the javamail package information from Oracle, you will find a test app that has been used successfully with Sendmail over SSL.