From 117332fcc34457aadb85db18dbc42f48d32b732e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 22 May 2017 11:25:40 +0200 Subject: [PATCH] =?utf8?q?Mailer:=20Exception=20in=20=C2=BBsend=C2=AB=20vi?= =?utf8?q?a=20LXDebug=20ausgeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das Debugging ist schwierig, wenn die einzige Fehlermeldung etwas wie »something went wrong« ist. --- SL/Mailer.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 0a2715cb2..52a7d7469 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -221,8 +221,11 @@ sub send { # Create driver for delivery method (sendmail/SMTP) $self->{driver} = eval { $self->_create_driver }; if (!$self->{driver}) { - $self->_store_in_journal('failed', 'driver could not be created; check your configuration'); - return "send email : $@"; + my $error = $@; + $self->_store_in_journal('failed', 'driver could not be created; check your configuration & log files'); + $::lxdebug->message(LXDebug::WARN(), "Mailer error during 'send': $error"); + + return "send email : $error"; } # Set defaults & headers -- 2.20.1