Merge "Add Date and Message-ID to summit invites"
This commit is contained in:
commit
478eaa8053
@ -16,6 +16,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import csv
|
import csv
|
||||||
|
import email.utils
|
||||||
import settings
|
import settings
|
||||||
import smtplib
|
import smtplib
|
||||||
import sys
|
import sys
|
||||||
@ -66,9 +67,20 @@ if __name__ == '__main__':
|
|||||||
content = template.substitute(name=committer.name,
|
content = template.substitute(name=committer.name,
|
||||||
code=code,
|
code=code,
|
||||||
signature=settings.EMAIL_SIGNATURE)
|
signature=settings.EMAIL_SIGNATURE)
|
||||||
msg = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%s" % (
|
msg = (
|
||||||
settings.EMAIL_FROM, ','.join(committer.emails),
|
"From: %s\r\n"
|
||||||
settings.EMAIL_SUBJECT, content)
|
"To: %s\r\n"
|
||||||
|
"Date: %s\r\n"
|
||||||
|
"Message-ID: %s\r\n"
|
||||||
|
"Subject: %s\r\n"
|
||||||
|
"%s"
|
||||||
|
% (
|
||||||
|
settings.EMAIL_FROM,
|
||||||
|
','.join(committer.emails),
|
||||||
|
email.utils.formatdate(),
|
||||||
|
email.utils.make_msgid(),
|
||||||
|
settings.EMAIL_SUBJECT,
|
||||||
|
content))
|
||||||
|
|
||||||
session.sendmail(settings.EMAIL_FROM, committer.emails, msg)
|
session.sendmail(settings.EMAIL_FROM, committer.emails, msg)
|
||||||
print "%s,ATC,%s" % (code, committer.name)
|
print "%s,ATC,%s" % (code, committer.name)
|
||||||
|
Loading…
Reference in New Issue
Block a user