From 436d07d2bcc44785aa8c2452e67f069aff2ed201 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 20 Jan 2004 00:05:46 +0000 Subject: [PATCH] add roundup version to mailer headers git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2049 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/mailer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roundup/mailer.py b/roundup/mailer.py index 6d9e6c8..ddfc109 100644 --- a/roundup/mailer.py +++ b/roundup/mailer.py @@ -1,5 +1,5 @@ """Sending Roundup-specific mail over SMTP.""" -# $Id: mailer.py,v 1.3 2003-10-04 11:21:47 jlgijsbers Exp $ +# $Id: mailer.py,v 1.4 2004-01-20 00:05:46 richard Exp $ import time, quopri, os, socket, smtplib, re @@ -7,6 +7,7 @@ from cStringIO import StringIO from MimeWriter import MimeWriter from roundup.rfc2822 import encode_header +from roundup import __version__ class MessageSendError(RuntimeError): pass @@ -36,6 +37,8 @@ class Mailer: writer.addheader('X-Roundup-Name', self.config.TRACKER_NAME) # and another one to avoid loops writer.addheader('X-Roundup-Loop', 'hello') + # finally, an aid to debugging problems + writer.addheader('X-Roundup-Version', __version__) writer.addheader('MIME-Version', '1.0') @@ -58,7 +61,7 @@ class Mailer: quopri.encode(content, body, 0) self.smtp_send(to, message) - + def bounce_message(self, bounced_message, to, error, subject='Failed issue tracker submission'): """Bounce a message, attaching the failed submission. -- 2.30.2