From: schlatterbeck Date: Mon, 23 May 2011 12:15:23 +0000 (+0000) Subject: Allow to specify additional cc and bcc emails (not roundup users) for X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f73c3fc2696b8172df70b11b7910a29f11b9dc6;p=roundup.git Allow to specify additional cc and bcc emails (not roundup users) for nosymessage used by the nosyreaction reactor. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4608 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 5d1e8fd..12d17c4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ Richard Jones did the change. Features: - Norwegian Bokmal translation by Christian Aastorp +- Allow to specify additional cc and bcc emails (not roundup users) for + nosymessage used by the nosyreaction reactor. 2011-05-13 1.4.17 (r4605) diff --git a/roundup/roundupdb.py b/roundup/roundupdb.py index 06d3a60..19b3004 100644 --- a/roundup/roundupdb.py +++ b/roundup/roundupdb.py @@ -194,7 +194,7 @@ class IssueClass: """ def nosymessage(self, issueid, msgid, oldvalues, whichnosy='nosy', - from_address=None, cc=[], bcc=[]): + from_address=None, cc=[], bcc=[], cc_emails = [], bcc_emails = []): """Send a message to the members of an issue's nosy list. The message is sent only to users on the nosy list who are not @@ -213,6 +213,12 @@ class IssueClass: message to that may not be specified in the message's recipients list. These recipients will not be included in the To: or Cc: address lists. + + The cc_emails and bcc_emails arguments take a list of additional + recipient email addresses (just the mail address not roundup users) + this can be useful for sending to additional email addresses which are no + roundup users. These arguments are currently not used by roundups + nosyreaction but can be used by customized (nosy-)reactors. """ if msgid: authid = self.db.msg.get(msgid, 'author') @@ -267,11 +273,13 @@ class IssueClass: for userid in cc + self.get(issueid, whichnosy): if good_recipient(userid): add_recipient(userid, sendto) + sendto.extend (cc_emails) # now deal with bcc people. for userid in bcc: if good_recipient(userid): add_recipient(userid, bcc_sendto) + bcc_sendto.extend (bcc_emails) if oldvalues: note = self.generateChangeNote(issueid, oldvalues)