From 0bffb6e654803c99dd02e956db76028afe90e6fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 May 2013 11:43:16 +0200 Subject: [PATCH] Fix: Test error code --- scripts/contracts/email_expire_services_to_customers.php | 5 +++++ .../contracts/email_expire_services_to_representatives.php | 5 +++++ scripts/invoices/email_unpaid_invoices_to_customers.php | 5 +++++ .../invoices/email_unpaid_invoices_to_representatives.php | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index def494d8159..d497274238e 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -245,6 +245,11 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldcustomer,$dura if ($mode == 'confirm') { $result=$mail->sendfile(); + if (! $result) + { + print "Error sending email ".$mail->error."\n"; + dol_syslog("Error sending email ".$mail->error."\n"); + } } else { diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index 08b6d9bde7d..9e070848235 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -244,6 +244,11 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta if ($mode == 'confirm') { $result=$mail->sendfile(); + if (! $result) + { + print "Error sending email ".$mail->error."\n"; + dol_syslog("Error sending email ".$mail->error."\n"); + } } else { diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index cf9e5f283b0..6de28e592c3 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -264,6 +264,11 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget) if ($mode == 'confirm') { $result=$mail->sendfile(); + if (! $result) + { + print "Error sending email ".$mail->error."\n"; + dol_syslog("Error sending email ".$mail->error."\n"); + } } else { diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 24577a75d21..1ceaee6bb18 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -239,6 +239,11 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldsalerepresenta if ($mode == 'confirm') { $result=$mail->sendfile(); + if (! $result) + { + print "Error sending email ".$mail->error."\n"; + dol_syslog("Error sending email ".$mail->error."\n"); + } } else {