Commit 13dbcf87 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

add explicit config toggle to disable sendmail

parent 4d413d06
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -583,7 +583,8 @@ qq{select * from pending_mails where email = ? and num_tries > 1;}
	$self->helper(
		sendmail => sub {
			state $sendmail
			  = Travelynx::Helper::Sendmail->new( config => $self->config );
			  = Travelynx::Helper::Sendmail->new(
				config => ( $self->config->{mail} // {} ) );
		}
	);

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ sub custom {
		body => encode( 'utf-8', $body ),
	);

	if ( $self->{config}->{db}->{database} =~ m{travelynx_dev} ) {
	if ( $self->{config}->{disabled} ) {

		# Do not send mail in dev mode
		say "sendmail to ${to}: ${subject}\n\n${body}";