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

Avoid crash on sendmail issues

parent 399fa371
No related branches found
No related tags found
No related merge requests found
Pipeline #171 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;
......@@ -187,7 +186,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