Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118011559
D120.1775557982.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D120.1775557982.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 10:33 AM (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18836432
Default Alt Text
D120.1775557982.diff (1 KB)
Attached To
Mode
D120: Fix From header encoding in invitation notifications (#4258)
Attached
Detach File
Event Timeline