• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

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:
0
missmuppet
Asked:
missmuppet
1 Solution
 
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
 
sakuya_suCommented:
use phpmailer?

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

And btw! Another Kiwi, awesome! nice to meet you xD
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now