Skip to content

Commit 4ecab88

Browse files
authored
Merge pull request #11 from ajnagashima/master
Add Date field to notification email
2 parents 7854f7d + 35c7e95 commit 4ecab88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proxstar/mail.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import smtplib
2+
from email.utils import formatdate
23
from email.mime.text import MIMEText
34
from email.mime.multipart import MIMEMultipart
45

@@ -9,6 +10,7 @@ def send_email(toaddr, subject, body):
910
msg['From'] = fromaddr
1011
msg['To'] = toaddr
1112
msg['Subject'] = subject
13+
msg['Date'] = formatdate(localtime=True)
1214
body = body
1315
msg.attach(MIMEText(body, 'plain'))
1416
server = smtplib.SMTP('mail.csh.rit.edu', 25)

0 commit comments

Comments
 (0)