Feng Forum
Support => Older versions => : zensursula July 31, 2009, 04:09:35 PM
-
I added a patch to solve the following problem:
I can successfully send a mail with new opengoo release 1.5 final. But opengoo always adds an empty entry for CC: and BCC and sometimes for TO (depending on the ',') to the swift mail module. Swift tries to send the mail to the empty recipients. Some Mailserver does not handle such mails and return one or more failure notices.
The attached patch only adds contacts to the swift mail module, if they are not empty.
-
Thanks.
-
Please i have the same issue in my 1.5.2 installation , if i send mail with "bcc" and "cc" in blank and the smtp server not send this mail.
Please how install the patch? it´s correct for 1.5.2 version? , i´m not php coder , unable to locate the correct position of code im the file "mailutilities.class.php"
Thanks in advance.
Carlos.
-
to apply the patch you must replace lines 369 - 372 of /environment/classes/mail/MailUtilities.class.php
$cc = trim($cc, " ,");
$bcc = trim($bcc, " ,");
if ($cc != '') $mailer->addCc(explode(",", $cc));
if ($bcc != '') $mailer->addBcc(explode(",", $bcc));
for these ones:
$ccArr = explode(",", $cc);
foreach ($ccArr as $k => $v) {
if (trim($v) == '') unset($ccArr[$k]);
}
if(count($ccArr)>0) $mailer->addCc($ccArr);
$bccArr = explode(",", $bcc);
foreach ($bccArr as $k => $v) {
if (trim($v) == '') unset($bccArr[$k]);
}
if(count($bccArr)>0) $mailer->addBcc($bccArr);
-
Ok, thanks a lot for your quick reply ,
I test this patch.
BCC works well
CC don´t work , we must add a email
GRACIAS !!
-
UPDATE:
Version 1.5.3 running whitout this error :)