Fix SMTP exception when an email is send to the moderator.
svn path=/plone.app.discussion/trunk/; revision=46013
This commit is contained in:
parent
e3eaef18b8
commit
b26d5a5a62
@ -4,6 +4,9 @@ Changelog
|
||||
1.0RC1 (unreleased)
|
||||
-------------------
|
||||
|
||||
- Fix SMTP exception when an email is send to the moderator.
|
||||
[timo]
|
||||
|
||||
- Make sure comment UIDs in the catalog are always unique. This fixes
|
||||
http://dev.plone.org/plone/ticket/10652.
|
||||
[timo]
|
||||
|
@ -307,11 +307,14 @@ def notify_moderator(obj, event):
|
||||
if PLONE_4:
|
||||
try:
|
||||
mail_host.send(message, mto, sender, subject, charset='utf-8')
|
||||
except SMTPException:
|
||||
logger.error('SMTP exception while trying to send an ' +
|
||||
'email from %s to %s',
|
||||
except SMTPException, e:
|
||||
logger.error('SMTP exception (%s) while trying to send an ' +
|
||||
'email notification to the comment moderator ' +
|
||||
'(from %s to %s, message: %s)',
|
||||
e,
|
||||
sender,
|
||||
comment.author_email)
|
||||
mto,
|
||||
message)
|
||||
else: # pragma: no cover
|
||||
try:
|
||||
mail_host.secureSend(message,
|
||||
@ -319,8 +322,11 @@ def notify_moderator(obj, event):
|
||||
sender,
|
||||
subject=subject,
|
||||
charset='utf-8')
|
||||
except SMTPException:
|
||||
logger.error('SMTP exception while trying to send an ' +
|
||||
'email from %s to %s',
|
||||
except SMTPException, e:
|
||||
logger.error('SMTP exception (%s) while trying to send an ' +
|
||||
'email notification to the comment moderator ' +
|
||||
'(from %s to %s, message: %s)',
|
||||
e,
|
||||
sender,
|
||||
comment.author_email)
|
||||
mto,
|
||||
message)
|
||||
|
Loading…
Reference in New Issue
Block a user