Use secureSend for user email notification on Plone 3

svn path=/plone.app.discussion/trunk/; revision=44736
This commit is contained in:
Timo Stollenwerk 2010-10-31 10:34:58 +00:00
parent c8cd370fc9
commit fa6e380eaf

View File

@ -220,7 +220,20 @@ def notify_user(obj, event):
mapping={'title': content_object.title,
'link': content_object.absolute_url()}),
context=obj.REQUEST)
mail_host.send(message, comment.author_email, sender, subject)
# Send email
if PLONE_4:
mail_host.send(message,
comment.author_email,
sender,
subject,
charset='utf-8')
else:
mail_host.secureSend(message,
comment.author_email,
sender,
subject=subject,
charset='utf-8') # pragma: no cover
def notify_moderator(obj, event):
"""Tell the moderator when a comment needs attention.