I've made a contact form on my client's site, but the email that is supposed to send to him isn't sending with the PHP mail function. The second email, which is a confirmation email to the person that submitted the form, works. But the one that is supposed to send to my client doesn't.
Account username: elitepet
Here is the code:
Does anybody know why it won't send? There aren't any errors. The other one sends fine, but this one doesn't. I've checked the spam folder, etc. and it's not in there. It sent several days ago but it hasn't been working now.
Thank you in advance.
Account username: elitepet
Here is the code:
PHP:
$to = "email1@email.com, email2@email.com"; // changed emails for privacy reasons
$bcc = "email@email.com";
$subject = "Contact Form Submission from $name";
$date = date("l, F j, Y \a\\t g:i A");
$body = "There has been a new contact form submission on the Elite Pet Stop Fencing website.
Name: $name
Email Address: $email
Phone Number: $phone
Submitted: $date
Message:
$message
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To send a reply to $name, just reply to this email notification or compose a new email to $email.";
$headers = 'Content-type: text/plain' . "\r\n" .
'From: Elite Pet Stop Fencing <noreply@elitepetfence.com>' . "\r\n" .
'Reply-To: '.$email . "\r\n" .
'Bcc: '.$bcc . "\r\n" .
'MIME-Version: 1.0' . " \r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $body, $headers) or die("Error: Could not send email.");
Does anybody know why it won't send? There aren't any errors. The other one sends fine, but this one doesn't. I've checked the spam folder, etc. and it's not in there. It sent several days ago but it hasn't been working now.
Thank you in advance.