From: Moritz Bunkus Date: Mon, 22 May 2017 09:25:40 +0000 (+0200) Subject: Mailer: Exception in »send« via LXDebug ausgeben X-Git-Tag: release-3.5.4~1076 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=117332fcc34457aadb85db18dbc42f48d32b732e;p=kivitendo-erp.git Mailer: Exception in »send« via LXDebug ausgeben Das Debugging ist schwierig, wenn die einzige Fehlermeldung etwas wie »something went wrong« ist. --- 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