summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-02 20:10:48 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-02 20:10:48 +0200
commit4787dbae15118edcf17f503b6de37ce645d19cc3 (patch)
tree4ede51a588a04bd960d3ed4fdc9c3eb320dfb0ff /lib/Travelynx.pm
parent68718860e29f5ce1c2c10afc99c0bfeb9943d6d6 (diff)
move mailing to sendmail helper
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm3
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 ) = @_;