diff --git a/examples/travelynx.conf b/examples/travelynx.conf index fe3e96098fa776ea417fd10fad3196df539fd8f0..851698c0d3889ba66bce1f8393e9c486dbd5a2ff 100644 --- a/examples/travelynx.conf +++ b/examples/travelynx.conf @@ -22,14 +22,6 @@ 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 # settings. hypnotoad => { @@ -41,6 +33,18 @@ 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 ' + from => die("Changeme!"), + }, + # Secrets used for cookie signing and verification. Must contain at least # 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 diff --git a/lib/Travelynx/Helper/Sendmail.pm b/lib/Travelynx/Helper/Sendmail.pm index fa3c4fda92ae206782644fb82c645d427639484c..73b08cd1044333298f0db1c70d0c561565d539ff 100644 --- a/lib/Travelynx/Helper/Sendmail.pm +++ b/lib/Travelynx/Helper/Sendmail.pm @@ -21,7 +21,7 @@ sub custom { my $reg_mail = Email::Simple->create( header => [ To => $to, - From => 'Travelynx ', + From => $self->{config}{from}, Subject => $subject, 'Content-Type' => 'text/plain; charset=UTF-8', ],