Using the PHP mail() function on a server for a client
When i do:
mail("name@domain.com",$sub,$body,$head);
It fails (returns nothing and is not sent)
But if i do:
mail("name@domain.com,x",$sub,$body,$head);
it works fine
I currently have it set up to this, just so my client can actually do work
mail("name@domain.com,no-reply@domain.com",$sub,$body,$head);
which is not a great solution, any ideas?
Thanks Andy
If your second senario works fine then in that case you can use
$receivers = array(
"name@domain.com",
"no-reply@domain.com"
);
foreach ($receivers as $receiver) {
// to send email one by one to the recipients
mail("$receiver,x",$sub,$body,$head);
}
?>