diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-02 20:10:48 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-02 20:10:48 +0200 |
commit | 4787dbae15118edcf17f503b6de37ce645d19cc3 (patch) | |
tree | 4ede51a588a04bd960d3ed4fdc9c3eb320dfb0ff /lib/Travelynx.pm | |
parent | 68718860e29f5ce1c2c10afc99c0bfeb9943d6d6 (diff) |
move mailing to sendmail helper
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 234f1b8..6bdc133 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -12,6 +12,7 @@ use List::Util qw(first); use List::MoreUtils qw(after_incl before_incl); use Travel::Status::DE::IRIS; use Travel::Status::DE::IRIS::Stations; +use Travelynx::Helper::Sendmail; our $VERSION = qx{git describe --dirty} || 'experimental'; @@ -492,6 +493,8 @@ qq{select * from pending_mails where email = ? and num_tries > 1;} }, ); + $self->helper(sendmail => sub { state $sendmail = Travelynx::Helper::Sendmail->new; }); + $self->helper( 'get_departures' => sub { my ( $self, $station, $lookbehind ) = @_; |