Commit f4d401d5 authored by Seblu's avatar Seblu
Browse files

Add date in email header

parent bd577927
......@@ -27,6 +27,7 @@ from archversion.error import ERR_FATAL, ERR_ABORT, ERR_UNKNOWN
from archversion.pacman import parse_pkgbuild, pkgbuild_set_version, pkgbuild_update_checksums
from archversion.version import VersionController
from email.mime.text import MIMEText
from email.utils import formatdate
from io import StringIO
from smtplib import SMTP
import argparse
......@@ -185,9 +186,10 @@ def command_sendmail(args, vctrl):
return
# format the mail
msg = MIMEText(stdout.getvalue())
msg['Subject'] = subject
msg['From'] = "Archversion <version@archlinux.org>"
msg['To'] = to
msg["Subject"] = subject
msg["From"] = "Archversion <version@archlinux.org>"
msg["To"] = to
msg["Date"] = formatdate(localtime=True)
# send the mail
try:
s = SMTP(smtp)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment