|
From: Greg M. <bli...@us...> - 2008-09-17 02:43:23
|
Update of /cvsroot/phpwebsite-comm/modules/mailinglists/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22324/class Modified Files: Email.php Log Message: Added more error checks when sending emails to help the debugging of future issues. Index: Email.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/mailinglists/class/Email.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Email.php 16 Sep 2008 04:02:23 -0000 1.6 --- Email.php 17 Sep 2008 02:42:58 -0000 1.7 *************** *** 303,308 **** $mail = new PHPWS_Mail; ! $mail->addSendTo($send_to); ! $mail->setFrom('"' . $list->getFromName() . '" <' . $list->getFromEmail() . '>'); /* If the email is a list_id of 0, it means this is not a mass mailing, rather a module email. */ --- 303,317 ---- $mail = new PHPWS_Mail; ! ! if (!$mail->addSendTo($send_to)) ! { ! return PHPWS_Error::get(MAILINGLISTS_MAIL_SEND_TO_FAILED, 'mailinglists', 'MailingLists_Email::send', $send_to); ! } ! ! $setfrom = '"' . $list->getFromName() . '" <' . $list->getFromEmail() . '>'; ! if (!$mail->setFrom($setfrom)) ! { ! return PHPWS_Error::get(MAILINGLISTS_MAIL_SET_FROM_FAILED, 'mailinglists', 'MailingLists_Email::send', $setfrom); ! } /* If the email is a list_id of 0, it means this is not a mass mailing, rather a module email. */ |