I know you should use the appropriate mail object, but email is just port 25.
SMTP is a very old protocol, and its more than possible to write mail using a
java socket connection.
just open up a connection on port 25, and use the SMTP command set.
i found the mailer class a little tricky to use.