mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
Merge pull request #11 from ajnagashima/master
Add Date field to notification email
This commit is contained in:
commit
4ecab88b7d
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import smtplib
|
||||
from email.utils import formatdate
|
||||
from email.mime.text import MIMEText
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
|
||||
|
@ -9,6 +10,7 @@ def send_email(toaddr, subject, body):
|
|||
msg['From'] = fromaddr
|
||||
msg['To'] = toaddr
|
||||
msg['Subject'] = subject
|
||||
msg['Date'] = formatdate(localtime=True)
|
||||
body = body
|
||||
msg.attach(MIMEText(body, 'plain'))
|
||||
server = smtplib.SMTP('mail.csh.rit.edu', 25)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue