title: android javamail api does not use specified port (STARTTLS)
body: <p>I try to send an eMail via smtp and STARTTLS encryption.
  My Code:</p>
  
  <pre><code>Properties emailProperties = new Properties();  
  emailProperties.setProperty("mail.smtp.host", emailHost); 
  emailProperties.put("mail.smtp.auth", "true");   
  emailProperties.setProperty("mail.smtp.starttls.enable", "true");
  emailProperties.put("mail.smtp.port", emailPort);  
  Log.i("GMail", "Mail server properties set.");
  mailSession = Session.getInstance(emailProperties, this);
  mailSession.setDebug(true);
  </code></pre>
  
  <p>When I call Transport.send(...) I get the following Log-entries:</p>
  
  <pre><code>09-13 11:10:23.293: I/System.out(2483): DEBUG SMTP: useEhlo true, useAuth false
  09-13 11:10:23.293: I/System.out(2483): DEBUG SMTP: trying to connect to host "smtp.web.de", port 465, isSSL true
  09-13 11:10:30.323: E/GMail(2483): Could not connect to SMTP host: smtp.web.de, port: 465
  09-13 11:10:30.323: E/GMail(2483): javax.mail.MessagingException: Could not connect to SMTP host: smtp.web.de, port: 465;
  09-13 11:10:30.323: E/GMail(2483):   nested exception is:
  09-13 11:10:30.323: E/GMail(2483):  java.net.ConnectException: failed to connect to smtp.web.de/213.
  </code></pre>
  
  <p>My web.de server requieres the port 587. But javamail ignors the settings and try to connect at port 465. When I use <code>mail.transport.protocol="smtps"</code> then it uses port 587 but then I get an protocolException.</p>