Catch error on registration of new user and email for registration could not be send
Opened this issue · 0 comments
frlan commented
When trying to register an account with a email address that cannot be used -- in this case the target mail server was the same as the sending mail server -- there should be a proper error handling not just a 500 server error.
May 01 16:15:31 frlan00 gunicorn[4386]: smtplib.SMTPRecipientsRefused: {'foo@baa.info': (550, b'5.1.1 <foo@baa.info: Recipient address rejected: User unknown in virtual mailbox table')}
May 01 16:15:31 frlan00 gunicorn[4386]: raise SMTPRecipientsRefused(senderrs)
May 01 16:15:31 frlan00 gunicorn[4386]: File "/nix/store/yjbbi7vavq8pvhkr4ydndfczqsiyj31n-python3-3.4.4/lib/python3.4/smtplib.py", line 792, in sendmail
May 01 16:15:31 frlan00 gunicorn[4386]: self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n'))