Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
3503474b
Commit
3503474b
authored
Feb 17, 2021
by
medmunds
Committed by
Alexander Kulumbeg
Mar 21, 2021
Browse files
Add Date email header in Python implementation
parent
eb1606b0
Changes
1
Show whitespace changes
Inline
Side-by-side
notify/smtp.sh
View file @
3503474b
...
...
@@ -287,6 +287,7 @@ try:
from email.message import EmailMessage
except ImportError:
from email.mime.text import MIMEText as EmailMessage # Python 2
from email.utils import formatdate as rfc2822_date
from smtplib import SMTP, SMTP_SSL, SMTPException
from socket import error as SocketError
except ImportError as err:
...
...
@@ -318,6 +319,7 @@ except (AttributeError, TypeError):
msg["Subject"] = subject
msg["From"] = from_email
msg["To"] = to_emails
msg["Date"] = rfc2822_date(localtime=True)
msg["X-Mailer"] = x_mailer
smtp = None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment