title: Some servers refuse to send SMTP emails with Java: "No authentication mechansims supported by both server and client"
body: <p>I have the same SMTP email code deployed on various servers (about 6 machines, currently). We have a test job scheduled to run against these machines, one at a time. In other words, I'm passing the same information to each server: same credentials, same smtp server, same port number, etc. The only differences are the subject and body text. These two fields are unique on a per-execution basis.</p>
  
  <p>We use the javax.mail package for this code.</p>
  
  <p>Now, this code works on four of the machines, but on two of them, I receive the following error message:</p>
  
  <blockquote>
    <p>javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client</p>
  </blockquote>
  
  <p>Any ideas on how to debug this? I don't understand why the SAME code with the SAME credentials and the SAME authentication stuff would be failing on some machines, but not others.</p>
  
  <p>I'll edit this post with developments as I come across them.</p>
  
  <p>Thanks.</p>