[Mailman-Developers] Digest Subject

Tokio Kikuchi tkikuchi@is.kochi-u.ac.jp
Sat Nov 23 10:10:41 2002


I am not very sure but looks like subject header of digest
is not mime encoded. Here is a patch.


--- /home/mailman/src/mailman/Mailman/Handlers/ToDigest.py	Sat Oct 19 08:25:57 2002
+++ ToDigest.py	Sat Nov 23 19:02:39 2002
@@ -37,6 +37,7 @@
  from email.MIMEText import MIMEText
  from email.MIMEMessage import MIMEMessage
  from email.Utils import getaddresses
+from email.Header import Header

  from Mailman import mm_cfg
  from Mailman import Utils
@@ -139,20 +140,22 @@
      volume = mlist.volume
      issue = mlist.next_digest_number
      digestid = _('%(realname)s Digest, Vol %(volume)d, Issue %(issue)d')
+    charset = Utils.GetCharSet(lang)
+    digestid_h = Header(digestid, charset)
      # Set things up for the MIME digest.  Only headers not added by
      # CookHeaders need be added here.
      mimemsg = Message.Message()
      mimemsg['Content-Type'] = 'multipart/mixed'
      mimemsg['MIME-Version'] = '1.0'
      mimemsg['From'] = mlist.GetRequestEmail()
-    mimemsg['Subject'] = digestid
+    mimemsg['Subject'] = digestid_h
      mimemsg['To'] = mlist.GetListEmail()
      mimemsg['Reply-To'] = mlist.GetListEmail()
      # Set things up for the rfc1153 digest
      plainmsg = StringIO()
      rfc1153msg = Message.Message()
      rfc1153msg['From'] = mlist.GetRequestEmail()
-    rfc1153msg['Subject'] = digestid
+    rfc1153msg['Subject'] = digestid_h
      rfc1153msg['To'] = mlist.GetListEmail()
      rfc1153msg['Reply-To'] = mlist.GetListEmail()
      separator70 = '-' * 70



-- 
Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/




More information about the Mailman-Developers mailing list