Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1943 by Jan.Koprowski: [ReviewBoard] Sending e-mail raise
exception in Django framework (under some condition)
http://code.google.com/p/reviewboard/issues/detail?id=1943
What version are you running?
ReviewBoard 1.5
What steps will reproduce the problem?
1. Create "robot" user in admin panel but don't set e-mail for them
2. Send review using post-review on behalf someone using robot username
publishing it and passing all necessary informations in parameters
3. Look do Apache logs. Django was crashed sending e-mail
What is the expected output? What do you see instead?
E-mail should be send to reviewer and submitter. Instead of that I see
following in Apache log:
[Tue Jan 11 09:44:36 2011] [error] ERROR:root:Error sending e-mail
notification with subject 'Review title' to '"Jan Koprowski"
<submitter@address>,,"Christina Hammond" <reviewer@address>': need more
than 1 value to unpack
[Tue Jan 11 09:44:36 2011] [error] Traceback (most recent call last):
[Tue Jan 11 09:44:36 2011] [error]
File "/reviewboard/lib/python2.7/site-packages/ReviewBoard-1.5.00.000.0_intel-py2.7.egg/reviewboard/notifications/email.py",
line 177, in send_review_mail
[Tue Jan 11 09:44:36 2011] [error] message.send()
[Tue Jan 11 09:44:36 2011] [error]
File "/reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/message.py",
line 179, in send
[Tue Jan 11 09:44:36 2011] [error] return
self.get_connection(fail_silently).send_messages([self])
[Tue Jan 11 09:44:36 2011] [error]
File "/reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py",
line 85, in send_messages
[Tue Jan 11 09:44:36 2011] [error] sent = self._send(message)
[Tue Jan 11 09:44:36 2011] [error]
File "/reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py",
line 104, in _send
[Tue Jan 11 09:44:36 2011] [error] recipients = map(self._sanitize,
email_message.recipients())
[Tue Jan 11 09:44:36 2011] [error]
File "/reviewboard/lib/python2.7/site-packages/Django-1.2.4-py2.7.egg/django/core/mail/backends/smtp.py",
line 95, in _sanitize
[Tue Jan 11 09:44:36 2011] [error] name, domain = email.split('@', 1)
[Tue Jan 11 09:44:36 2011] [error] ValueError: need more than 1 value to
unpack
What operating system are you using? What browser?
Linux
Apache2
mod_wsgi
Please provide any additional information below.
Cause of this issue is in reviewboard/notification/email.py in function
send_review_mail (approximately line 122):
from_email = get_email_address_for_user(user)
recipients = set([from_email])
In those lines "from_email" is empty and add empty element to set of
recipients.
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reviewboard-issues?hl=en.