Commit 26e82fcc authored by Seblu's avatar Seblu
Browse files

Use configured mail from

parent 922612f0
......@@ -173,7 +173,8 @@ def command_sendmail(args, vctrl):
# check args
try:
to = config["mail"]["to"]
subject = config["mail"]["subject"]
from_ = config["mail"].get("from", "Archversion <noreply@archlinux.org>")
subject = config["mail"].get("subject", "Archversion Report")
smtp = config["smtp"]["host"]
except KeyError as exp:
logging.error("Invalid sendmail config: %s" % exp)
......@@ -190,7 +191,7 @@ def command_sendmail(args, vctrl):
# format the mail
msg = MIMEText(stdout.getvalue())
msg["Subject"] = subject
msg["From"] = "Archversion <version@archlinux.org>"
msg["From"] = from_
msg["To"] = to
msg["Date"] = formatdate(localtime=True)
# send the mail
......
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