I've created a patch for using SSL sockets in the SMTP notification system.
This is good for using gmail/google apps as your email server as my company
does. I tried to honor the concept of allowing the end user to fully control
the JavaMail smtp session by setting system properties. In fact, this is how I
got this to originally work. What I did was add a "use SSL" checkbox on the
main hudson email configuration page. If that checkbox is set, when an email is
being sent it will set the smtp port to 465 and the socket factory to be the
javax ssl socket factory. It does check to see if these are already set and if
they are it does not override them. The idea is to give people a quick and easy
way to enable ssl email but still allow advanced users full control.