summaryrefslogtreecommitdiffstats
path: root/scripts/rfr
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rfr')
-rwxr-xr-xscripts/rfr10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/rfr b/scripts/rfr
index 0d54d572..030a9895 100755
--- a/scripts/rfr
+++ b/scripts/rfr
@@ -5,7 +5,6 @@
5 5
6import os 6import os
7import re 7import re
8import sys
9import json 8import json
10import argparse 9import argparse
11import tempfile 10import tempfile
@@ -63,6 +62,9 @@ Otherwise it's treated as a git commit ID.
63 help='Specify the email\'s subject.') 62 help='Specify the email\'s subject.')
64 parser.add_argument('-R', '--sender', action='store', default=None, 63 parser.add_argument('-R', '--sender', action='store', default=None,
65 help='Specify a special from: email address.') 64 help='Specify a special from: email address.')
65 parser.add_argument('-t', '--to', action='append', default=[],
66 help='Specify an additional To: email address. '
67 'Can be repeated (-t a -t b).')
66 68
67 # Positionals: the gerrit URLs. 69 # Positionals: the gerrit URLs.
68 parser.add_argument('commits', metavar='Commit-IDs', 70 parser.add_argument('commits', metavar='Commit-IDs',
@@ -277,13 +279,15 @@ def email_commits(commits_info, sender, subject, args):
277 else: 279 else:
278 msg = MIMEText(body) 280 msg = MIMEText(body)
279 281
280 msg['To'] = to_addr 282 to_addrs = [to_addr] + args.to
283
284 msg['To'] = ", ".join(to_addrs)
281 msg['From'] = sender 285 msg['From'] = sender
282 msg['Subject'] = subject 286 msg['Subject'] = subject
283 287
284 s = smtplib.SMTP('mail.nvidia.com') 288 s = smtplib.SMTP('mail.nvidia.com')
285 s.sendmail(sender, 289 s.sendmail(sender,
286 [to_addr], 290 to_addrs,
287 msg.as_string()) 291 msg.as_string())
288 s.quit() 292 s.quit()
289 293