title: javamail 535 authentication error
body: <p>I am using the following settings inside of Spring to create my mail sender.</p>
  
  <pre><code>  &lt;bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"&gt;
        &lt;property name="host" value="mail.heavyweight.com"/&gt;
        &lt;property name="password" value="xxxxxx"/&gt;
        &lt;property name="port" value="26"/&gt;
        &lt;property name="username" value="thom@heavyweight.com"/&gt;
        &lt;property name="session"&gt;
          &lt;bean class="javax.mail.Session" factory-method="getDefaultInstance"&gt;
            &lt;constructor-arg&gt;
              &lt;props&gt;
                &lt;prop key="mail.smtp.from"&gt;thom@heavyweight.com&lt;/prop&gt;
                &lt;prop key="mail.smtp.user"&gt;thom@heavyweight.com&lt;/prop&gt;
                &lt;prop key="mail.smtp.auth"&gt;true&lt;/prop&gt;
                &lt;prop key="mail.smtp.starttls.enable"&gt;false&lt;/prop&gt;
              &lt;/props&gt;
            &lt;/constructor-arg&gt;
            &lt;property name="debug" value="true"/&gt;
          &lt;/bean&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
  </code></pre>
  
  <p>Using the same SMTP server, user, and password that I use in my mail client.</p>
  
  <p>When I try to send an email, I get this in the debug:</p>
  
  <pre><code>DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
  DEBUG SMTP: useEhlo true, useAuth true
  
  DEBUG SMTP: trying to connect to host "mail.heavyweight.com", port 26, isSSL false
  220-dyn.dynamicwebs.com ESMTP Exim 4.69 #1 Thu, 23 Feb 2012 16:55:27 -0600 
  220-We do not authorize the use of this system to transport unsolicited, 
  220 and/or bulk e-mail.
  DEBUG SMTP: connected to host "mail.heavyweight.com", port: 26
  
  EHLO motion
  250-dyn.dynamicwebs.com Hello 74-133-195-24.dhcp.insightbb.com [74.133.195.24]
  250-SIZE 52428800
  250-PIPELINING
  250-AUTH PLAIN LOGIN
  250-STARTTLS
  250 HELP
  DEBUG SMTP: Found extension "SIZE", arg "52428800"
  DEBUG SMTP: Found extension "PIPELINING", arg ""
  DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
  DEBUG SMTP: Found extension "STARTTLS", arg ""
  DEBUG SMTP: Found extension "HELP", arg ""
  DEBUG SMTP: Attempt to authenticate
  DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
  AUTH LOGIN
  334 VXNlcm5hbWU6
  dGhvbUBoZWF2eXdlaWdodHNvZnR3YXJlLmNvbQ==
  334 UGFzc3dvcmQ6
  [redacted]
  535 Incorrect authentication data
  </code></pre>
  
  <p>So why do I get the 535? Any ideas?</p>
  
  <p>I have successfully done this several times before without issue. Something specific about this server.</p>
  
  <p>The password appears to be encrypted. Since I need the password to be unencrypted, won't this be a problem?</p>
  
  <p>Thanks.</p>