Catch errors when sending emails

RESOLVED FIXED in 5.12

Status

addons.mozilla.org Graveyard
Code Quality
RESOLVED FIXED
8 years ago
2 years ago

People

(Reporter: clouserw, Assigned: clouserw)

Tracking

unspecified
5.12

Details

(Whiteboard: [qa-])

(Assignee)

Description

8 years ago
/ru/firefox/users/pwreset


Traceback (most recent call last):

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/utils/decorators.py", line 76, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/contrib/auth/views.py", line 123, in password_reset
   form.save(**opts)

 File "/data/amo_python/www/prod/zamboni/apps/users/forms.py", line 27, in save
   super(PasswordResetForm, self).save(**kw)

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/contrib/auth/forms.py", line 137, in save
   t.render(Context(c)), None, [user.email])

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/core/mail/__init__.py", line 61, in send_mail
   connection=connection).send()

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/core/mail/message.py", line 175, in send
   return self.get_connection(fail_silently).send_messages([self])

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/core/mail/backends/smtp.py", line 85, in send_messages
   sent = self._send(message)

 File "/data/amo_python/www/prod/zamboni/vendor/src/django/django/core/mail/backends/smtp.py", line 101, in _send
   email_message.message().as_string())

 File "/usr/lib64/python2.6/smtplib.py", line 709, in sendmail
   raise SMTPRecipientsRefused(senderrs)

SMTPRecipientsRefused: {u'ded3s57@yandex.ru': (553, 'Requested mail action aborted: Mailbox name has been suppressed.')}
(Assignee)

Comment 1

8 years ago
I didn't generate errors on an SMTP server to test this, but I think this will work.  r? http://github.com/clouserw/zamboni/commit/6c6ce203d03dd06535f9102b553363c45849bae0

It's kind of a bug in django that there isn't a global setting for ignoring mail failures I think.
(Assignee)

Comment 2

8 years ago
thanks for the review, jbalogh
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.