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):
# format the mail
msg = MIMEText(stdout.getvalue())
msg['Subject'] = subject
msg['From'] = "Archversion <>"
msg['To'] = to
msg["Subject"] = subject
msg["From"] = "Archversion <>"
msg["To"] = to
msg["Date"] = formatdate(localtime=True)
# send the mail
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