开发者

php email send to multiple address not working

Hi friends why this is not working ? While doing print_r , $emails ( which is T开发者_运维知识库o) is not showing any emails. It's fine when i send to only one person.

$mails = array('abc@gmail.com','123@email.com');
$emails = implode(",",$mails);

$from= 'abc@imail.com);
$subject = 'hello';
$body = 'test';
send_email($from,$emails,$body,$subject);


Try changing to

$mails = array('abc@gmail.com','123@email.com');
foreach($mails as $k=>$m){
  $mails =trim($mails[$k]);
}
$emails = trim(implode(", ",$mails));

$from= 'abc@imail.com';
$subject = 'hello';
$body = 'test';
send_email($from,$emails,$body,$subject);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜