Page MenuHomePhorge

D120.1775467722.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D120.1775467722.diff

diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -1109,9 +1109,10 @@
import smtplib
from email.MIMEText import MIMEText
from email.Utils import formatdate
+ from email.header import Header
+ from email import charset
# encode unicode strings with quoted-printable
- from email import charset
charset.add_charset('utf-8', charset.SHORTEST, charset.QP)
organizer = object.get_organizer()
@@ -1205,7 +1206,8 @@
msg['To'] = receiving_user['mail']
msg['Date'] = formatdate(localtime=True)
msg['Subject'] = utils.str2unicode(_('"%s" has been updated') % (object.get_summary()))
- msg['From'] = utils.str2unicode('"%s" <%s>' % (orgname, orgemail) if orgname else orgemail)
+ msg['From'] = Header(utils.str2unicode('%s' % orgname) if orgname else '')
+ msg['From'].append("<%s>" % orgemail)
smtp = smtplib.SMTP("localhost", 10027)
@@ -1237,9 +1239,10 @@
import smtplib
from email.MIMEText import MIMEText
from email.Utils import formatdate
+ from email.header import Header
+ from email import charset
# encode unicode strings with quoted-printable
- from email import charset
charset.add_charset('utf-8', charset.SHORTEST, charset.QP)
log.debug(_("Send cancellation notification for %s %r to user %r") % (
@@ -1279,7 +1282,8 @@
msg['To'] = receiving_user['mail']
msg['Date'] = formatdate(localtime=True)
msg['Subject'] = utils.str2unicode(_('"%s" has been cancelled') % (object.get_summary()))
- msg['From'] = utils.str2unicode('"%s" <%s>' % (orgname, orgemail) if orgname else orgemail)
+ msg['From'] = Header(utils.str2unicode('%s' % orgname) if orgname else '')
+ msg['From'].append("<%s>" % orgemail)
smtp = smtplib.SMTP("localhost", 10027)

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 6, 9:28 AM (2 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18836432
Default Alt Text
D120.1775467722.diff (1 KB)

Event Timeline