php email send to multiple address not working -


hi friends why not working ? while doing print_r , $emails ( to) not showing emails. it's fine when send 1 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 $k=>$m){   $mails =trim($mails[$k]); } $emails = trim(implode(", ",$mails));  $from= 'abc@imail.com'; $subject = 'hello'; $body = 'test'; send_email($from,$emails,$body,$subject); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -