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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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