Do not kill script when error
This commit is contained in:
parent
fb2d4f8328
commit
6889d941b8
1 changed files with 4 additions and 2 deletions
|
@ -308,8 +308,10 @@ sub send_notifications {
|
||||||
Subject => 'Bla',
|
Subject => 'Bla',
|
||||||
Type => 'TEXT',
|
Type => 'TEXT',
|
||||||
Data => 'Hello';
|
Data => 'Hello';
|
||||||
$email->send('smtp', $smtp_host, Timeout=>5, Auth=>'LOGIN', AuthUser=>$smtp_user, AuthPass=>$smtp_password, Port=>$smtp_port, SSL=>$smtp_ssl, Debug=>0) or output('failed to send notification to ' . $emails->{'email'} . ' (' . $email->error() . ')', 'ERROR');;
|
eval {
|
||||||
|
$email->send('smtp', $smtp_host, Timeout=>5, Auth=>'LOGIN', AuthUser=>$smtp_user, AuthPass=>$smtp_password, Port=>$smtp_port, SSL=>$smtp_ssl, Debug=>0) or output('failed to send notification to ' . $emails->{'email'} . ' (' . $email->error() . ')', 'ERROR');;
|
||||||
|
};
|
||||||
|
warn() if $@;
|
||||||
}
|
}
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue