@@ -227,7 +227,8 @@ def addmessage(self, issueid, summary, text):
227227 """
228228
229229 def nosymessage (self , issueid , msgid , oldvalues , whichnosy = 'nosy' ,
230- from_address = None , cc = [], bcc = [], cc_emails = [], bcc_emails = []):
230+ from_address = None , cc = [], bcc = [], cc_emails = [],
231+ bcc_emails = [], subject = None ):
231232 """Send a message to the members of an issue's nosy list.
232233
233234 The message is sent only to users on the nosy list who are not
@@ -238,6 +239,12 @@ def nosymessage(self, issueid, msgid, oldvalues, whichnosy='nosy',
238239 If 'msgid' is None, the message gets sent only to the nosy
239240 list, and it's called a 'System Message'.
240241
242+ The "subject" argument is used as subject for the message. If no
243+ subject is passed, a subject will be generated from the message.
244+ Note the subject does not include the item designator [classID]
245+ prefix that allows proper processing of reply emails. The caller
246+ needs to include that label in the subject if needed.
247+
241248 The "cc" argument indicates additional recipients to send the
242249 message to that may not be specified in the message's recipients
243250 list.
@@ -248,12 +255,12 @@ def nosymessage(self, issueid, msgid, oldvalues, whichnosy='nosy',
248255 address lists. Note that the list of bcc users *is* updated in
249256 the recipient list of the message, so this field has to be
250257 protected (using appropriate permissions), otherwise the bcc
251- will be decuceable for users who have web access to the tracker.
258+ will be deduceable for users who have web access to the tracker.
252259
253260 The cc_emails and bcc_emails arguments take a list of additional
254261 recipient email addresses (just the mail address not roundup users)
255262 this can be useful for sending to additional email addresses
256- which are no roundup users. These arguments are currently not
263+ which are not roundup users. These arguments are currently not
257264 used by roundups nosyreaction but can be used by customized
258265 (nosy-)reactors.
259266
@@ -350,10 +357,10 @@ def good_recipient(userid):
350357 self .db .msg .set (msgid , recipients = recipients )
351358 if sendto ['plain' ] or bcc_sendto ['plain' ]:
352359 self .send_message (issueid , msgid , note , sendto ['plain' ],
353- from_address , bcc_sendto ['plain' ])
360+ from_address , bcc_sendto ['plain' ], subject )
354361 if sendto ['crypt' ] or bcc_sendto ['crypt' ]:
355362 self .send_message (issueid , msgid , note , sendto ['crypt' ],
356- from_address , bcc_sendto ['crypt' ], crypt = True )
363+ from_address , bcc_sendto ['crypt' ], subject , crypt = True )
357364
358365 # backwards compatibility - don't remove
359366 sendmessage = nosymessage
@@ -390,7 +397,7 @@ def encrypt_to(self, message, sendto):
390397 return msg
391398
392399 def send_message (self , issueid , msgid , note , sendto , from_address = None ,
393- bcc_sendto = [], crypt = False ):
400+ bcc_sendto = [], subject = None , crypt = False ):
394401 '''Actually send the nominated message from this issue to the sendto
395402 recipients, with the note appended.
396403 '''
@@ -498,7 +505,9 @@ def send_message(self, issueid, msgid, note, sendto, from_address=None,
498505 if from_tag :
499506 from_tag = ' ' + from_tag
500507
501- subject = '[%s%s] %s' % (cn , issueid , title )
508+ if subject is None :
509+ subject = '[%s%s] %s' % (cn , issueid , title )
510+
502511 author = (authname + from_tag , from_address )
503512
504513 # send an individual message per recipient?
0 commit comments