Erudika / scoold-pro

Cloud-ready Q&A platform for the enterprise (self-hosted, on premise)
https://scoold.com
Other
7 stars 0 forks source link

A non existent email address causes all notifications to fail. #51

Closed jorgeag68 closed 3 years ago

jorgeag68 commented 3 years ago

After disabling an email address on our email server, but keeping the user on Scoold then all mail notifications started to fail.

I believe that in this case the application should catch the error and send the notifications to the other users.

""DEBUG SMTP: Invalid Addresses DEBUG SMTP: xxxx@xxxxxxxxx.com DEBUG SMTP: Sending failed because of invalid destination addresses RSET 250 2.0.0 Reset state DEBUG SMTP: MessagingException while sending, THROW: javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 Mailbox xxxx@xxxxxxxxxxx.com does not exist

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2064)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1286)
    at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:465)
    at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:361)
    at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:378)
    at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:366)
    at com.erudika.scoold.utils.ScooldEmailer$1.run(ScooldEmailer.java:65)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 Mailbox xxxx@xxxxxxxx.com does not exist

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1917)
    ... 9 more

QUIT 221 2.0.0 SMTP closing connection """

Regards,