Do not hardcode From mail address

This commit is contained in:
Daniel Friesel 2020-03-13 18:28:13 +01:00
parent 901cfc50d8
commit 871a44f15e
2 changed files with 13 additions and 9 deletions

View file

@ -22,14 +22,6 @@
password => die("Changeme!"), password => die("Changeme!"),
}, },
mail => {
# If you want to disable outgoing mail for development purposes,
# uncomment the following line. Mails will instead be logged as
# Mojolicious "info" messages, causing their content to be printed on
# stdout.
## disabled => 1,
},
# See the Mojo::Server::Hypnotoad manual for details on the following # See the Mojo::Server::Hypnotoad manual for details on the following
# settings. # settings.
hypnotoad => { hypnotoad => {
@ -41,6 +33,18 @@
spare => 2, spare => 2,
}, },
mail => {
# If you want to disable outgoing mail for development purposes,
# uncomment the following line. Mails will instead be logged as
# Mojolicious "info" messages, causing their content to be printed on
# stdout.
## disabled => 1,
# Otherwise, specify the sender ("From" field) for mail sent by travelynx
# here. E.g. 'Travelynx <mail@example.org>'
from => die("Changeme!"),
},
# Secrets used for cookie signing and verification. Must contain at least # Secrets used for cookie signing and verification. Must contain at least
# one random string. If you specify several strings, the first one will # one random string. If you specify several strings, the first one will
# be used for signing new cookies, and the remaining ones will still be # be used for signing new cookies, and the remaining ones will still be

View file

@ -21,7 +21,7 @@ sub custom {
my $reg_mail = Email::Simple->create( my $reg_mail = Email::Simple->create(
header => [ header => [
To => $to, To => $to,
From => 'Travelynx <travelynx@finalrewind.org>', From => $self->{config}{from},
Subject => $subject, Subject => $subject,
'Content-Type' => 'text/plain; charset=UTF-8', 'Content-Type' => 'text/plain; charset=UTF-8',
], ],