php crashes

A

Anonymous

Guest
i am using php to update my database and send an email with a temp password. if i comment out the sendMail call to true it all works, i have an email and tempPassword, if i leave it in i get The page cannot be displayed because an internal server error has occurred.

Code:
			if(sendMail($email,$tempPassword))
			{
				.....
			}

 function sendMail($emailSend, $tempPassword)
 {
	 $email_to = $emailSend;
	 $email_from = "info@biteboard.ca";
	 $email_bcc = "info@biteboard.ca";
	 $email_subject = "Bite Board temporary password.";
	 $email_message = "Hello " . $emailSend .
		"\n\n\n Your temporary password is " . $tempPassword .
		"\n\n Please login to the BiteBoard app and change you password using the menu." .
		"\n\n--Thank you the BiteBoard team.";
	 
	  $headers = 'From: ' . $email_from . "\r\n" .
	  'Reply-To: ' . $email_from . "\r\n" .
          'Bcc: ' . $mail_bcc . "\r\n" .
	  'X-Mailer: PHP/' . phpversion();
	  
          $reply = @mail($email_to, $email_subject, $email_message, $headers);

	  if ($reply)
	  {
		return true;
	  }
	  else
	  {
		return false;  
	  }
return false;
}


i cant seem to find my error, ive stared at the code all afternoon.
 
i figured it out, had mail instead of email in a few spots.
 
Back
Top