title: Spring java mail : send mail impossible with yahoo
body: <p>I am trying to user spring java mail with theses properties : </p>
  
  <pre><code>mail:
          host: smtp.mail.yahoo.com
          port: 587
          username: xxx
          password: xxx
          protocol: smtp
          properties.mail.smtp:
              auth: true
              starttls.enable: true
  </code></pre>
  
  <p>Code : </p>
  
  <pre><code>@Inject
  private JavaMailSenderImpl javaMailSender;
  ...
  
  MimeMessage mimeMessage = javaMailSender.createMimeMessage();
  message.setTo(to);
  message.setFrom(fromEmail);
  message.setSubject(subject);
  message.setText(content, isHtml);
  javaMailSender.send(mimeMessage);
  </code></pre>
  
  <p>But I am getting this error when I send the mail : </p>
  
  <blockquote>
    <p>E-mail could not be sent to user 'xxx@yahoo.fr', exception is:
    Authentication failed; nested exception is
    javax.mail.AuthenticationFailedException: 535 5.7.0 (#MBR1212)
    Incorrect username or password.</p>
  </blockquote>
  
  <p>I am sure my login/pwd are correct.
  Are my properties incorrect?</p>