2012-07-21 | Paul Boddie | raw annotate files changeset graph | Added handling of PGP/GPG-encrypted messages. Split the tests into separate scripts that prepare and send messages, with gpg usage required to encrypt the initial message before sending. |
1 #!/usr/bin/env python 2 3 from email.mime.multipart import MIMEMultipart 4 from email.mime.text import MIMEText 5 6 if __name__ == "__main__": 7 message = MIMEMultipart() 8 9 text1 = MIMEText("An update to the Wiki.", "moin") 10 11 text2 = MIMEText("Another update to the Wiki.", "moin") 12 13 message.attach(text1) 14 message.attach(text2) 15 16 text = message.as_string() 17 print text 18 19 # vim: tabstop=4 expandtab shiftwidth=4