Nicholas Cole wrote: > >What do I need to do to ensure that emails are generated only in 7, >not 8-bit encodings? I assume that I need to use >email.charset.add_charset , but can't quite work out what incantation >to give it. Does anyone have any pointers?
I'm not sure what it is you're asking. Does this answer your question? >>> import email.message >>> m = email.message.Message() >>> m.set_payload("""A few lines ... of 7-bit text ... ... No high bit characters. ... """, 'us-ascii') >>> print m.as_string() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit A few lines of 7-bit text No high bit characters. >>> -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com