Commits

cmlenz  committed a9b5333

Ported [1512] to stable.

  • Participants
  • Parent commits 35f3b14
  • Branches 0.8-stable

Comments (0)

Files changed (2)

 Ian Leader              ian.leader@line.co.uk
 Christopher Lenz        cmlenz@gmx.de
 Ivo Looser              ivo.looser@login.ch
+Angel Marin             anmar@gmx.net
 James Moger             jamesm@transonic.com
 Tim Moloney             moloney@mrsl.com
 Jennifer Murtell        jen@jmurtell.com

File trac/Notify.py

     def send(self, rcpt, mime_headers={}):
         from email.MIMEText import MIMEText
         from email.Header import Header
+        from email.Utils import formatdate
         body = self.cs.render()
         msg = MIMEText(body, 'plain', 'utf-8')
         msg['X-Mailer'] = 'Trac %s, by Edgewall Software' % __version__
         msg['Sender'] = self.from_email
         msg['Reply-To'] = self.replyto_email
         msg['To'] = rcpt
-        msg['Date'] = time.strftime('%a, %d %b %Y %H:%M:%S +0000', time.gmtime());
+        msg['Date'] = formatdate()
         for hdr in mime_headers.keys():
             msg[hdr] = mime_headers[hdr]
         self.server.sendmail(self.from_email, rcpt, msg.as_string())