Uploaded image for project: 'Gateway'
  1. Gateway
  2. GTWY-960

Email Subsystem Doesn't Handle Username/Password Correctly

XMLWordPrintable

    • Icon: Defect Defect
    • Resolution: Done
    • Icon: Minor Minor
    • 1.0.0-ALPHA
    • None
    • Notification
    • None

      We have added some new fields to be set on our Javamail subsystem: Username and Password.

      These two values are represented in our properties file as:
      email.server.username=
      email.server.password=

      If the two properties above are not set then blank strings ("") are passed in as properties. Which is not quite what the mail subsystem is really expecting. The mail subsystem either wants null values or true values that will authenticate.

      This has been causing the following exception to occur in our application:

      Exception in thread "main" org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: failed to connect
      at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:416)
      at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342)
      at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:357)
      at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:346)
      at eske.mail.impl.SpringJavaMailSender.send(SpringJavaMailSender.java:43)
      at eske.service.mail.impl.spring.MailServiceImpl.sendMailMessageInternal(MailServiceImpl.java:120)
      at eske.service.mail.impl.spring.MailServiceImpl.sendSimpleMailMessage(MailServiceImpl.java:55)
      at eske.main.mail.ExampleMailMain.main(ExampleMailMain.java:53)
      Caused by: javax.mail.AuthenticationFailedException: failed to connect
      at javax.mail.Service.connect(Service.java:322)
      at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
      ... 7 more

              nhook Nathan Hook
              nhook Nathan Hook
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: