diff --git a/bin/ngcp-credit-warning b/bin/ngcp-credit-warning index 3c74e7a..30137ff 100755 --- a/bin/ngcp-credit-warning +++ b/bin/ngcp-credit-warning @@ -140,7 +140,10 @@ sub main { { map { $_ => $balance->{$_} } qw(id cash_balance) }; } if (@contracts) { - send_email($cwarning, \@contracts); + eval { + send_email($cwarning, \@contracts); + }; + print $EVAL_ERROR if $EVAL_ERROR; } } return; diff --git a/bin/ngcp-fraud-auto-lock b/bin/ngcp-fraud-auto-lock index 370e82c..de498ab 100755 --- a/bin/ngcp-fraud-auto-lock +++ b/bin/ngcp-fraud-auto-lock @@ -185,7 +185,10 @@ sub main { if ($event->{interval_lock} > 0) { lock_customer($event, $subscribers); } - send_email($event, $subscribers); + eval { + send_email($event, $subscribers); + }; + print $EVAL_ERROR if $EVAL_ERROR; } return; } diff --git a/bin/ngcp-fraud-daily-lock b/bin/ngcp-fraud-daily-lock index ba38beb..cdb33be 100755 --- a/bin/ngcp-fraud-daily-lock +++ b/bin/ngcp-fraud-daily-lock @@ -185,7 +185,10 @@ sub main { if ($event->{interval_lock} > 0) { lock_customer($event, $subscribers); } - send_email($event, $subscribers); + eval { + send_email($event, $subscribers); + }; + print $EVAL_ERROR if $EVAL_ERROR; } return; }