PHP code not sending to both email addresses listed only one

Code in PHP form is sending form results to one email address only not both, the first recipient receives the email results the second name listed does not.

mail("emma@eventi.co.nz,emma@sfauckland.co.nz",
"#Delegate registration SFNZ National Conference 2007",
"This is an automated message:
LVL 1
missmuppetAsked:
Who is Participating?
 
sakuya_suConnect With a Mentor Commented:
use phpmailer?

http://www.phpfreaks.com/tutorials/130/4.php

And btw! Another Kiwi, awesome! nice to meet you xD
0
 
jentulmanCommented:
How many different email addresses have you used?
have you tried to use the successful email address twice?

e.g. "emma@eventi.co.nz, emma@eventi.co.nz"

it could be that the mail command isn't filling in absolutely all of the usual headers so this is increasing the score of the message in a spam filter somewhere.

0
 
jasonsbytesCommented:
If you send only to the second name, does it work?  If not, this is a problem with that email address, not your mail command.

Your mail command looks perfect, there is nothing wrong with it.
0
 
Chris GralikeSpecialistCommented:
$rcpts = array(
"1" => "mymail@server.tld",
"2" => "myother@server.tpd");

foreach( $rcpts as $key => $value){
      mail($value, .... etc
}

regards,
0
 
Chris GralikeSpecialistCommented:
ps this is a way to validate if all mail rcpts where succesfull... ie.

foreach( blaaa){
        if(mail(blaaa)){
                $successes[] = $value;
        }else{
                $failures[] = $value;
         }
}

regards,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.