From fa6e380eafc2232582ebe3deb69ea14decc9bdc5 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 31 Oct 2010 10:34:58 +0000 Subject: [PATCH] Use secureSend for user email notification on Plone 3 svn path=/plone.app.discussion/trunk/; revision=44736 --- plone/app/discussion/comment.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 929447e..0809c90 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -220,8 +220,21 @@ 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.