Skip to content
Snippets Groups Projects
Verified Commit e9ca6052 authored by David Beniamine's avatar David Beniamine
Browse files

Avoid crash on sendmail issues

parent 0fe546f6
Branches
No related tags found
No related merge requests found
Pipeline #172 failed
......@@ -30,7 +30,6 @@ use Data::Dumper;
use Cpanel::JSON::XS qw(encode_json);
use Log::Dispatch;
use Getopt::ArgParse;
use Try::Tiny;
my $Logger;
my %running_backups;
......@@ -185,7 +184,9 @@ sub do_sendmail($$$){
Disposition => 'inline'
);
}
$SIG{__DIE__} = sub { };
eval{ $msg->send() };
$SIG{__DIE__} = sub {do_stop(shift,1)};
if($@){
if($retry == 0){
$Logger->info("Seconde tentative d'envoi courriel sans piece jointe");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment