I just resolved a problem like yours, hope this is helpful.
As this
doc:http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html
the smtp authentication is forbidden by default, if you mail server don't require an authentication, you app could connect the server without problem.
But if it need, you need declare it be true before create a connection.
Properties props = System.getProperties();
// -- Attaching to default Session, or we could start a new one --
// -- Could use Session.getTransport() and Transport.connect()
// , but assume we're using SMTP --
props.put("mail.smtp.host", smtpServer);
// add this line
props.put("mail.smtp.auth", "true");
Session session = Session.getDefaultInstance(props, null);