Minor tweaks in send_pgp_mime.py
authorW. Trevor King <wking@drexel.edu>
Wed, 15 Jul 2009 18:06:03 +0000 (14:06 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 15 Jul 2009 18:06:03 +0000 (14:06 -0400)
 * No reason to set maxheaderlen to something other than the default.
 * MIMEText sets content-type and charset automatically.

interfaces/email/interactive/send_pgp_mime.py

index d5a649703d12c3249d143a4f3da88896d6e7d6d4..43c26d328c1e1627315279219c32014602219877 100644 (file)
@@ -160,7 +160,7 @@ def flatten(msg):
     """
     assert msg != None
     fp = StringIO()
-    g = Generator(fp, mangle_from_=False, maxheaderlen=60)
+    g = Generator(fp, mangle_from_=False)
     g.flatten(msg)
     text = fp.getvalue()
     return text    
@@ -329,9 +329,7 @@ class Mail (object):
         return target_emails(self.headermsg)
     def clearBodyPart(self):
         body = MIMEText(self.body)
-        body.add_header('Content-Type', 'text/plain')
         body.add_header('Content-Disposition', 'inline')
-        body.set_charset('us-ascii')
         return body
     def passphrase_arg(self, passphrase=None):
         if passphrase == None and PASSPHRASE != None: