comparison roundup/mailgw.py @ 1329:b1f86cc82d33

added date header to emails [SF#651358]
author Richard Jones <richard@users.sourceforge.net>
date Wed, 11 Dec 2002 01:52:20 +0000
parents 328d68db2ef8
children f2f553611ce0
comparison
equal deleted inserted replaced
1328:b4d4770658c1 1329:b1f86cc82d33
71 set() method to add the message to the item's spool; in the second case we 71 set() method to add the message to the item's spool; in the second case we
72 are calling the create() method to create a new node). If an auditor raises 72 are calling the create() method to create a new node). If an auditor raises
73 an exception, the original message is bounced back to the sender with the 73 an exception, the original message is bounced back to the sender with the
74 explanatory message given in the exception. 74 explanatory message given in the exception.
75 75
76 $Id: mailgw.py,v 1.101 2002-12-10 00:23:35 richard Exp $ 76 $Id: mailgw.py,v 1.102 2002-12-11 01:52:20 richard Exp $
77 ''' 77 '''
78 78
79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
80 import time, random, sys 80 import time, random, sys
81 import traceback, MimeWriter 81 import traceback, MimeWriter
331 writer.addheader('X-Roundup-Loop', 'hello') 331 writer.addheader('X-Roundup-Loop', 'hello')
332 writer.addheader('Subject', subject) 332 writer.addheader('Subject', subject)
333 writer.addheader('From', '%s <%s>'% (self.instance.config.TRACKER_NAME, 333 writer.addheader('From', '%s <%s>'% (self.instance.config.TRACKER_NAME,
334 self.instance.config.TRACKER_EMAIL)) 334 self.instance.config.TRACKER_EMAIL))
335 writer.addheader('To', ','.join(sendto)) 335 writer.addheader('To', ','.join(sendto))
336 writer.addheader('Date', time.strftime("%a, %d %b %Y %H:%M:%S +0000",
337 time.gmtime()))
336 writer.addheader('MIME-Version', '1.0') 338 writer.addheader('MIME-Version', '1.0')
337 part = writer.startmultipartbody('mixed') 339 part = writer.startmultipartbody('mixed')
338 part = writer.nextpart() 340 part = writer.nextpart()
339 body = part.startbody('text/plain') 341 body = part.startbody('text/plain')
340 body.write('\n'.join(error)) 342 body.write('\n'.join(error))

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