title: Spring Mail Authentication Error
body: <p>I am using spring 3.1 in my project and in order to send email, I am using spring mail. When I am trying to send an email, I aıways get this error:</p>
  
  <pre><code>org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client
  </code></pre>
  
  <p>My mail server does not require a username/ password and this error seems normal according to this fact. But the case is; I could not find a way to not to pass username/password in spring mail's org.springframework.mail.javamail.JavaMailSenderImpl class.</p>
  
  <p>My config is :</p>
  
  <pre><code>&lt;jee:jndi-lookup id="mailSession" jndi-name="${abc.app.mailSession}" cache="true"/&gt;
  
      &lt;bean id="jndiMailSender" class="com.abc.service.mail.JndiJavaMailService"&gt;
          &lt;property name="session" ref="mailSession"/&gt;
          &lt;property name="defaultEncoding" value="${mail.defaultEncoding}"/&gt;
          &lt;property name="username" value="${abc.mail.username}"/&gt;
          &lt;property name="password" value="${abc.mail.password}"/&gt;
          &lt;property name="mailMasterAdress" value="${abc.mail.mailMasterAdress}"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Mailserver is in weblogic and it's configs are:</p>
  
  <blockquote>
    <p>mail.smtp.host=10.200.123.135 mail.transport.protocol=smtp</p>
  </blockquote>
  
  <p>Any ideas?</p>