Loading lib/Travelynx.pm +4 −1 Original line number Diff line number Diff line Loading @@ -581,7 +581,10 @@ qq{select * from pending_mails where email = ? and num_tries > 1;} ); $self->helper( sendmail => sub { state $sendmail = Travelynx::Helper::Sendmail->new; } sendmail => sub { state $sendmail = Travelynx::Helper::Sendmail->new( config => $self->config ); } ); $self->helper( Loading lib/Travelynx/Helper/Sendmail.pm +3 −3 Original line number Diff line number Diff line Loading @@ -10,9 +10,9 @@ use Email::Sender::Simple qw(try_to_sendmail); use Email::Simple; sub new { my ($class) = @_; my ( $class, %opt ) = @_; return bless( {}, $class ); return bless( \%opt, $class ); } sub custom { Loading @@ -28,7 +28,7 @@ sub custom { body => encode( 'utf-8', $body ), ); if ( $self->app->config->{db}->{database} =~ m{travelynx_dev} ) { if ( $self->{config}->{db}->{database} =~ m{travelynx_dev} ) { # Do not send mail in dev mode say "sendmail to ${to}: ${subject}\n\n${body}"; Loading Loading
lib/Travelynx.pm +4 −1 Original line number Diff line number Diff line Loading @@ -581,7 +581,10 @@ qq{select * from pending_mails where email = ? and num_tries > 1;} ); $self->helper( sendmail => sub { state $sendmail = Travelynx::Helper::Sendmail->new; } sendmail => sub { state $sendmail = Travelynx::Helper::Sendmail->new( config => $self->config ); } ); $self->helper( Loading
lib/Travelynx/Helper/Sendmail.pm +3 −3 Original line number Diff line number Diff line Loading @@ -10,9 +10,9 @@ use Email::Sender::Simple qw(try_to_sendmail); use Email::Simple; sub new { my ($class) = @_; my ( $class, %opt ) = @_; return bless( {}, $class ); return bless( \%opt, $class ); } sub custom { Loading @@ -28,7 +28,7 @@ sub custom { body => encode( 'utf-8', $body ), ); if ( $self->app->config->{db}->{database} =~ m{travelynx_dev} ) { if ( $self->{config}->{db}->{database} =~ m{travelynx_dev} ) { # Do not send mail in dev mode say "sendmail to ${to}: ${subject}\n\n${body}"; Loading