add explicit config toggle to disable sendmail
This commit is contained in:
parent
4d413d06a3
commit
13dbcf8761
2 changed files with 3 additions and 2 deletions
|
@ -583,7 +583,8 @@ qq{select * from pending_mails where email = ? and num_tries > 1;}
|
||||||
$self->helper(
|
$self->helper(
|
||||||
sendmail => sub {
|
sendmail => sub {
|
||||||
state $sendmail
|
state $sendmail
|
||||||
= Travelynx::Helper::Sendmail->new( config => $self->config );
|
= Travelynx::Helper::Sendmail->new(
|
||||||
|
config => ( $self->config->{mail} // {} ) );
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ sub custom {
|
||||||
body => encode( 'utf-8', $body ),
|
body => encode( 'utf-8', $body ),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $self->{config}->{db}->{database} =~ m{travelynx_dev} ) {
|
if ( $self->{config}->{disabled} ) {
|
||||||
|
|
||||||
# Do not send mail in dev mode
|
# Do not send mail in dev mode
|
||||||
say "sendmail to ${to}: ${subject}\n\n${body}";
|
say "sendmail to ${to}: ${subject}\n\n${body}";
|
||||||
|
|
Loading…
Reference in a new issue