diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-02-18 17:13:47 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-02-18 17:13:47 +0100 |
commit | d22b09e8351ed59fbb7ffb9d4cb9d43280235485 (patch) | |
tree | 2129e558a4ee5a35e40420f5cc715fc07bbba5e6 | |
parent | 4bdc103664eba676fdee79140595cc7e8063b1eb (diff) | |
download | arch-mirror-tools-d22b09e8351ed59fbb7ffb9d4cb9d43280235485.tar.gz arch-mirror-tools-d22b09e8351ed59fbb7ffb9d4cb9d43280235485.tar.xz |
Fetch sender email from config
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | bin/generate-mirror-mail.pl | 3 | ||||
-rw-r--r-- | settings.conf | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/generate-mirror-mail.pl b/bin/generate-mirror-mail.pl index 64e3a5d..bdd4234 100755 --- a/bin/generate-mirror-mail.pl +++ b/bin/generate-mirror-mail.pl @@ -35,7 +35,6 @@ Missing from the mail are: =cut # TODO: put this in a config file -my $sender = 'bluewind@xinu.at'; #$ENV{HTTPS_CA_FILE} = '/etc/ssl/certs/ca-certificates.crt'; @@ -92,7 +91,7 @@ sub send_mail { open my $fh, "|compose-mail-from-stdin" or die "Failed to run mailer: $!"; print $fh "To: $to\n"; - print $fh "From: $sender\n"; + printf $fh "From: %s\n", $Config->{misc}->{email_from}; print $fh "Subject: $subject\n"; print $fh "\n"; print $fh "$body"; diff --git a/settings.conf b/settings.conf index 6367e1f..e1f4ab3 100644 --- a/settings.conf +++ b/settings.conf @@ -1,3 +1,6 @@ [account] username=foo password=bar + +[misc] +email_from = "foo@bar.com" |