Closed Bug 595765 Opened 14 years ago Closed 14 years ago

Catch errors when sending emails

Categories

(addons.mozilla.org Graveyard :: Code Quality, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: clouserw)

Details

(Whiteboard: [qa-])

/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.')}
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.
thanks for the review, jbalogh
Status: NEW → RESOLVED
Closed: 14 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.