siesha 0 Report post Posted July 16, 2010 ok ade xsape2 tau camne nk buat multiple recipient dlm php sb cari gune gugel..gagal betui. kot2 ade expert php ni tau kat bawah sy sertakan code yg da sy buat.kalo sorang lepas la antar email tp kalo byk je gagal..please kalo ade sape2 tau leh share kan.. function sendmailnotification2($bilE,$bild,$bilc,$date){ $email='[email protected]'; $sSubject = 'Daily statistic report '; $sMessage = " Dear All, kindly refer to the data below to find daily statistic. Date = $date New Registration User = $bilc Activated member = $bild product sales = $bilE "; return sendMail( $email, $sSubject, $sMessage, $ID); } kalo script kat atas utk sorang je lepas laa email memg dpt. tp kalo script yg bawah ni utk multiple memg xlepas..xdapek email..anybody can help? function sendmailnotification2($bilE,$bild,$bilc,$date){ $email='[email protected]'.','; $email.='[email protected]'; $sSubject = 'Daily statistic report '; $sMessage = " Dear All, kindly refer to the data below to find daily statistic. Date = $date New Registration User = $bilc Activated member = $bild product sales = $bilE "; return sendMail( $email, $sSubject, $sMessage, $ID); } Quote Share this post Link to post Share on other sites
johnburn 6 Report post Posted July 16, 2010 bleh try function ni: [php]function sendmailnotification2($emails, $bilE, $bild, $bilc, $date) { $sSubject = 'Daily statistic report '; $sMessage = " Dear All, kindly refer to the data below to find daily statistic. Date = $date New Registration User = $bilc Activated member = $bild product sales = $bilE "; if (is_array($emails)) { foreach($emails as $email) { sendMail($email, $sSubject, $sMessage, $ID); } } else { sendMail($emails, $sSubject, $sMessage, $ID); } }[/php] nak pkai, kl satu email: [php]$emails = "[email protected]"; sendmailnotification2($emails, "bla", "bla", "bla", "bla"); [/php] kl byk email: [php]$emails = array("[email protected]","[email protected]","[email protected]"); sendmailnotification2($emails, "bla", "bla", "bla", "bla"); [/php] kl ada error ke xjd ke gtau blk sbb xtry pn code ni Quote Share this post Link to post Share on other sites