Feng Forum

Support => Older versions => : zensursula July 31, 2009, 04:09:35 PM

: 1.5 final: Mail server always returns a mail failure notice "unknown recipient"
: 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.

: Re: 1.5 final: Mail server always returns a mail failure notice "unknown recipie
: ignacio August 03, 2009, 11:24:19 AM
Thanks.
: Re: 1.5 final: Mail server always returns a mail failure notice "unknown recipient"
: Karlos August 27, 2009, 12:08:30 PM
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.
: Re: 1.5 final: Mail server always returns a mail failure notice "unknown recipient"
: alvarotm01 August 27, 2009, 02:34:43 PM
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);
: Re: 1.5 final: Mail server always returns a mail failure notice "unknown recipient"
: Karlos August 28, 2009, 05:39:58 AM
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 !!
: Re: 1.5 final: Mail server always returns a mail failure notice "unknown recipient"
: Karlos September 03, 2009, 01:39:59 PM
UPDATE:

Version 1.5.3 running whitout this error  :)