 <p>I do expect that you are using the correct host on your side.</p> <p>But you are missing Username and Password.</p> <pre><code>transport = session.getTransport("smtp"); transport.connect(hostName, port, user, password); transport.sendMessage(message, message.getAllRecipients()); </code></pre> <p>or you can use the Authenticator:</p> <pre><code>Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }); </code></pre>