title: Why is JavaMail Transport.send() a static method?
body: <p>I'm revising code I did not write that uses JavaMail, and having a little trouble understanding why the JavaMail API is designed the way it is.  I have the feeling that if I understood, I could be doing a better job.</p>
  
  <p>We call:</p>
  
  <pre><code>transport = session.getTransport("smtp");
  transport.connect(hostName, port, user, password);
  </code></pre>
  
  <p>So why is Eclipse warning me that this:</p>
  
  <pre><code>transport.send(message, message.getAllRecipients());
  </code></pre>
  
  <p>is a call to a static method?</p>
  
  <p>Why am I getting a Transport object and providing settings that are specific to it if I can't use that object to send the message?  How does the Transport class even know what server and other settings to use to send the message?  It's working fine, which is hard to believe.  What if I had instantiated Transport objects for two different servers; how would it know which one to use?</p>
  
  <p>In the course of writing this question, I've discovered that I should really be calling:</p>
  
  <pre><code>transport.sendMessage(message, message.getAllRecipients());
  </code></pre>
  
  <p>So what is the purpose of the static Transport.send() method?  Is this just poor design, or is there a reason it is this way?</p>