1

This is the code I have:

private MailSender getMailSender() {
        JavaMailSenderImpl sender = new JavaMailSenderImpl();
        sender.setHost("mail");

        Properties properties = new Properties();
        properties.put("mail.smtp.auth", "false");
        sender.setJavaMailProperties(properties);

        return sender;
    }

The host is ok. I still get the AuthenticationException. Any help is greatly appreciated !

Mythul
  • 1,807
  • 7
  • 34
  • 53
  • PLease share Context.xml file – Vinayak Pingale Jan 21 '14 at 13:33
  • 1
    See similar question here http://stackoverflow.com/questions/19115732/send-mail-in-javax-mail-without-authentication. If the solution suggested there does not work for you then check whether the mail server you are using is configured to allow connections without authentication. – Edwin Zvavashe Jan 21 '14 at 19:42

0 Answers0