Skip to content

Commit 44ba317

Browse files
author
Richard Jones
committed
add roundup version to mailer headers
1 parent c5ebaa9 commit 44ba317

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roundup/mailer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""Sending Roundup-specific mail over SMTP."""
2-
# $Id: mailer.py,v 1.3 2003-10-04 11:21:47 jlgijsbers Exp $
2+
# $Id: mailer.py,v 1.4 2004-01-20 00:05:46 richard Exp $
33

44
import time, quopri, os, socket, smtplib, re
55

66
from cStringIO import StringIO
77
from MimeWriter import MimeWriter
88

99
from roundup.rfc2822 import encode_header
10+
from roundup import __version__
1011

1112
class MessageSendError(RuntimeError):
1213
pass
@@ -36,6 +37,8 @@ def get_standard_message(self, to, subject, author=None):
3637
writer.addheader('X-Roundup-Name', self.config.TRACKER_NAME)
3738
# and another one to avoid loops
3839
writer.addheader('X-Roundup-Loop', 'hello')
40+
# finally, an aid to debugging problems
41+
writer.addheader('X-Roundup-Version', __version__)
3942

4043
writer.addheader('MIME-Version', '1.0')
4144

@@ -58,7 +61,7 @@ def standard_message(self, to, subject, content, author=None):
5861
quopri.encode(content, body, 0)
5962

6063
self.smtp_send(to, message)
61-
64+
6265
def bounce_message(self, bounced_message, to, error,
6366
subject='Failed issue tracker submission'):
6467
"""Bounce a message, attaching the failed submission.

0 commit comments

Comments
 (0)