Session session = Session.getDefaultInstance();
Transport trans = session.getTransport();
//add recipients to the message and send
boolean sent = false;
try {
trans.send(message);
sent = true;
} catch (Exception e) {
Dialog.inform("Error while sending: " + e.toString());
}