Mercurial > moin > 1.9
changeset 59:26270b13f6df
mail: use Header() with charset
imported from: moin--main--1.5--patch-61
author | Thomas Waldmann <tw@waldmann-edv.de> |
---|---|
date | Fri, 30 Sep 2005 17:47:06 +0000 |
parents | 285ba792d278 |
children | b0cd40a3d4ff |
files | MoinMoin/i18n/mail_i18n-maintainers.py MoinMoin/util/mail.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/i18n/mail_i18n-maintainers.py Fri Sep 30 17:44:41 2005 +0000 +++ b/MoinMoin/i18n/mail_i18n-maintainers.py Fri Sep 30 17:47:06 2005 +0000 @@ -41,8 +41,8 @@ # Create a text/plain message msg = MIMEText(text, 'plain', charset) - msg['From'] = Header(mfrom) - msg['To'] = Header(', '.join(mto)) + msg['From'] = Header(mfrom, charset) + msg['To'] = Header(', '.join(mto), charset) msg['Subject'] = Header(subject, charset) msg['Date'] = formatdate()
--- a/MoinMoin/util/mail.py Fri Sep 30 17:44:41 2005 +0000 +++ b/MoinMoin/util/mail.py Fri Sep 30 17:47:06 2005 +0000 @@ -35,7 +35,6 @@ _ = request.getText cfg = request.cfg mail_from = kw.get('mail_from', '') or cfg.mail_from - mail_from = Header(mail_from) subject = subject.encode(config.charset) # Create a text/plain body using CRLF (see RFC2822) @@ -55,6 +54,7 @@ # Create message headers # Don't expose emails addreses of the other subscribers, instead we # use the same mail_from, e.g. "My Wiki <noreply@mywiki.org>" + mail_from = Header(mail_from, charset) msg['From'] = mail_from msg['To'] = mail_from msg['Date'] = formatdate()