comparison roundup/mailer.py @ 3517:5603e08ac6fc maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Fri, 27 Jan 2006 02:42:05 +0000
parents 8fcee705ebdb
children
comparison
equal deleted inserted replaced
3504:cf2771c76949 3517:5603e08ac6fc
1 """Sending Roundup-specific mail over SMTP. 1 """Sending Roundup-specific mail over SMTP.
2 """ 2 """
3 __docformat__ = 'restructuredtext' 3 __docformat__ = 'restructuredtext'
4 # $Id: mailer.py,v 1.10.2.1 2006-01-13 03:34:34 richard Exp $ 4 # $Id: mailer.py,v 1.10.2.2 2006-01-27 02:42:05 richard Exp $
5 5
6 import time, quopri, os, socket, smtplib, re 6 import time, quopri, os, socket, smtplib, re
7 7
8 from cStringIO import StringIO 8 from cStringIO import StringIO
9 from MimeWriter import MimeWriter 9 from MimeWriter import MimeWriter
118 118
119 part = writer.startmultipartbody('mixed') 119 part = writer.startmultipartbody('mixed')
120 part = writer.nextpart() 120 part = writer.nextpart()
121 part.addheader('Content-Transfer-Encoding', 'quoted-printable') 121 part.addheader('Content-Transfer-Encoding', 'quoted-printable')
122 body = part.startbody('text/plain; charset=utf-8') 122 body = part.startbody('text/plain; charset=utf-8')
123 body.write('\n'.join(error)) 123 body.write(quopri.encodestring ('\n'.join(error)))
124 124
125 # attach the original message to the returned message 125 # attach the original message to the returned message
126 part = writer.nextpart() 126 part = writer.nextpart()
127 part.addheader('Content-Disposition', 'attachment') 127 part.addheader('Content-Disposition', 'attachment')
128 part.addheader('Content-Description', 'Message you sent') 128 part.addheader('Content-Description', 'Message you sent')

Roundup Issue Tracker: http://roundup-tracker.org/