I have mentioned everything properly in the form as far as I know, but it's not able to go to any of the emails that I specify. Please could you guide me?
<?php
$name = $_POST[ name ];
$email = $_POST[ email ];
$message = $_POST[ message ];
$MobileNumber = $_POST[ MobileNumber ];
$AccountHolderName = $_POST[ AccountHolderName ];
$BankName = $_POST[ BankName ];
$BankAccountNumber = $_POST[ BankAccountNumber ];
$BranchAddressWithPinCode = $_POST[ BranchAddressWithPinCode ];
$IFSC = $_POST[ IFSC ];
$to = email@domain.com ; // this is where i put my email addres where i want
to rec. the mail.
$message = FROM: .$name. Email: .$email. Message: .$message;
$headers = From: youremail@domain.com . "\r\n";
if (filter_var($email, FILTER_VALIDATE_EMAIL)) { // this line checks that we
have a valid email address
mail($to, $subject, $message, $headers); //This method sends the mail.
echo "Your email was sent!"; // success message
}else{
echo "Invalid Email, please provide a correct email.";
}
?>