Merge branch 'add_date_timestamps' into 'master'
add date header to emails See merge request cpp/assembly!1
This commit is contained in:
commit
787ab55942
1 changed files with 3 additions and 1 deletions
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
import sys, requests, datetime, smtplib
|
import sys, requests, datetime, smtplib
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
from email.utils import formatdate
|
||||||
|
|
||||||
# Redmine config
|
# Redmine config
|
||||||
redmine_url = 'https://tickets.zom.bi'
|
redmine_url = 'https://tickets.zom.bi'
|
||||||
|
@ -107,6 +108,7 @@ def smtp_send()
|
||||||
mediawiki_page['content'] + mail_footer)
|
mediawiki_page['content'] + mail_footer)
|
||||||
mail_message['Subject'] = mail_subject
|
mail_message['Subject'] = mail_subject
|
||||||
mail_message['From'] = smtp_from
|
mail_message['From'] = smtp_from
|
||||||
|
mail_message['Date'] = formatdate()
|
||||||
for recipient in smtp_recipients:
|
for recipient in smtp_recipients:
|
||||||
mail_message['To'] = recipient
|
mail_message['To'] = recipient
|
||||||
smtp_server.sendmail(from_addr=smtp_from,\
|
smtp_server.sendmail(from_addr=smtp_from,\
|
||||||
|
|
Loading…
Reference in a new issue