The user fills in his and a friends email address and it's submitted to a mailer. How would I send to both recepients? A code example would be cool... Thanks
mail($toText, $subjectText, $msgText, "To: $toText <$toText>\n" . "From: $fromText <$fromText>\n" . "X-Mailer: PHP 4.x");
make $toText and array and then you can loop through it to output all the email addy's
$to = "user1@somewhere.com, [email]user2@somewhere.com[/email]"; $subject = "blah"; $message = "blah"; mail($to,$subject,$message);
Is this gonna work then?
$email1 = $POST["email1"]; $email2 = $POST["email2"];
$to = $email1,$email2;
$subject = "blah"; $message = "blah"; mail($to,$subject,$message);
Thanks
I got it to work last night adding the quotes:
$to = "$email1,$email2";