Commit 4c6668690e2c3a08c19684b115eb98b95aba2e0a

  • avatar
  • arvind
  • Mon Jan 20 14:03:07 IST 2014
Adding 'cc' to config file.
  • Diff rendering mode:
  • inline
  • side by side

report.py

89 subject = mailConfig.subject.format(startDate, endDate)89 subject = mailConfig.subject.format(startDate, endDate)
90 report = mailConfig.text.format(startDate, endDate) + '\n' + report90 report = mailConfig.text.format(startDate, endDate) + '\n' + report
91 mail = gmail.GMail(mailConfig.username, mailConfig.password)91 mail = gmail.GMail(mailConfig.username, mailConfig.password)
92 message = gmail.Message(subject, mailConfig.to, text=report)
92 message = gmail.Message(subject, mailConfig.to, mailConfig.cc, text=report)
93 mail.send(message)93 mail.send(message)

sampleMailConfig.py

2username="user@gmail.com"2username="user@gmail.com"
3password="yourpassword"3password="yourpassword"
4to="foo@bar.org, rajesh@email.org"4to="foo@bar.org, rajesh@email.org"
5subject="Subject line"
5cc="Same format as 'to'"
6bcc="Same format as 'to'"6bcc="Same format as 'to'"
7subject="Subject line"
7text=""8text=""