From e8dea5a81b1b6f256c41495a1b306087e793cdc5 Mon Sep 17 00:00:00 2001 From: Xenomporio <> Date: Sun, 26 Jun 2022 15:34:06 +0200 Subject: [PATCH] Bugfix sendmail cc & bcc empty --- www/lib/class.erpapi.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/lib/class.erpapi.php b/www/lib/class.erpapi.php index 9eda7349..07cc8e00 100644 --- a/www/lib/class.erpapi.php +++ b/www/lib/class.erpapi.php @@ -32547,7 +32547,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p foreach ($cc as $item) { $ccRecipients[] = new EmailRecipient($item, $item); } - } else { + } else if (!empty($cc)) { foreach (explode(',',str_replace(" ","",$cc)) as $item) { $ccRecipients[] = new EmailRecipient($item, $item); } @@ -32558,7 +32558,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p foreach ($bcc as $item) { $bccRecipients[] = new EmailRecipient($item, $item); } - } else { + } else if (!empty($bcc)) { foreach (explode(',',str_replace(" ","",$bcc)) as $item) { $bccRecipients[] = new EmailRecipient($item, $item); }