mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
EMail Date #885
This commit is contained in:
@@ -11,6 +11,7 @@ from email.mime.multipart import MIMEMultipart
|
|||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
from email.header import Header
|
from email.header import Header
|
||||||
from email.utils import parseaddr
|
from email.utils import parseaddr
|
||||||
|
from email.utils import formatdate
|
||||||
import smtplib
|
import smtplib
|
||||||
import socket
|
import socket
|
||||||
import ssl
|
import ssl
|
||||||
@@ -118,6 +119,8 @@ def send(pHTML, pText):
|
|||||||
msg['Subject'] = subject
|
msg['Subject'] = subject
|
||||||
msg['From'] = from_email
|
msg['From'] = from_email
|
||||||
msg['To'] = to_email
|
msg['To'] = to_email
|
||||||
|
msg['Date'] = formatdate(localtime=True)
|
||||||
|
|
||||||
msg.attach (MIMEText (message_text, 'plain'))
|
msg.attach (MIMEText (message_text, 'plain'))
|
||||||
msg.attach (MIMEText (message_html, 'html'))
|
msg.attach (MIMEText (message_html, 'html'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user