Bug 28416: Delay load of Email::Sender::Transport::SMTP

As it's taking 10M of RAM

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2021-05-21 14:10:56 +02:00 committed by Fridolin Somers
parent 96fcc24aba
commit 8e2a1d7927

View file

@ -21,8 +21,6 @@ use Koha::Database;
use Koha::Exceptions::Object;
use Koha::SMTP::Servers;
use Email::Sender::Transport::SMTP;
use base qw(Koha::Object);
=head1 NAME
@ -66,6 +64,7 @@ sub transport {
$params->{debug} = $self->debug;
require Email::Sender::Transport::SMTP;
my $transport = Email::Sender::Transport::SMTP->new( $params );
return $transport;