For some reason the mailer function in my website is only partially working. It is designed to send 2 emails, but it only sends the second one. Please give me some advice.
function sendRegister($first, $last, $user, $pass, $email){
$from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
$subject = "Troop 3 - Account Request";
$body = "An account request has been sumbitted "
."with the following information:\n\n"
."First Name: ".$first."\n"
."Last Name: ".$last."\n"
."Username: ".$user."\n"
."Password: ".$pass."\n"
."Email: ".$email."\n\n"
."http://www.westervilletroop3.org/adduser.php?urlfirst=".$first."&urllast=".$last."&urluser=".$user."&urlpass=".$pass."&urlemail=".$email."&urlaccess=2...7"."\n\n"
."- Troop 3";
$body2 = "We have recieved your request for an account "
."with the following information:\n\n"
."First Name: ".$first."\n"
."Last Name: ".$last."\n"
."Username: ".$user."\n"
."Password: ".$pass."\n"
."Email: ".$email."\n\n"
."We will send you an email if you get accepted, so make sure admin@troop3.0sites.org is in your email contact list so it won't be marked as spam.\n\n"
."- Troop 3";
mail("no...k@gmail.com",$subject,$body,$from);
mail($email,$subject,$body2,$from);
return true;
}