1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: roundupdb.py,v 1.12 2001-10-04 02:16 :15 richard Exp $
18+ # $Id: roundupdb.py,v 1.13 2001-10-21 00:45 :15 richard Exp $
1919
2020import re , os , smtplib , socket
2121
@@ -262,13 +262,27 @@ def sendmessage(self, nodeid, msgid):
262262 sendto = [self .db .user .get (i , 'address' ) for i in recipients ]
263263 cn = self .classname
264264 title = self .get (nodeid , 'title' ) or '%s message copy' % cn
265+ # figure author information
266+ authname = self .db .user .get (authid , 'realname' )
267+ if not authname :
268+ authname = self .db .user .get (authid , 'username' )
269+ authaddr = self .db .user .get (authid , 'address' )
270+ if authaddr :
271+ authaddr = '<%s> ' % authaddr
272+ else :
273+ authaddr = ''
274+ # TODO attachments
265275 m = ['Subject: [%s%s] %s' % (cn , nodeid , title )]
266276 m .append ('To: %s' % ', ' .join (sendto ))
267277 m .append ('Reply-To: %s' % self .ISSUE_TRACKER_EMAIL )
268278 m .append ('' )
279+ # add author information
280+ m .append ("%s %sadded the comment:" % (authname , authaddr ))
281+ m .append ('' )
282+ # add the content
269283 m .append (self .db .msg .get (msgid , 'content' ))
284+ # "list information" footer
270285 m .append (self .email_footer (nodeid , msgid ))
271- # TODO attachments
272286 try :
273287 smtp = smtplib .SMTP (self .MAILHOST )
274288 smtp .sendmail (self .ISSUE_TRACKER_EMAIL , sendto , '\n ' .join (m ))
@@ -289,6 +303,9 @@ def email_footer(self, nodeid, msgid):
289303
290304#
291305# $Log: not supported by cvs2svn $
306+ # Revision 1.12 2001/10/04 02:16:15 richard
307+ # Forgot to pass the protected flag down *sigh*.
308+ #
292309# Revision 1.11 2001/10/04 02:12:42 richard
293310# Added nicer command-line item adding: passing no arguments will enter an
294311# interactive more which asks for each property in turn. While I was at it, I
0 commit comments