I am new in this forum and I came here with a hope of help. I am working on my own small business website and I am stuck on the Contact Form part. I got a free template, I am working on the content and other part perfectly. But the contact form is sending any mail to my email address. I am able to fill it completely, but there is no email coming in my email address even after editing that form.
Following is the SendContact.PHP form :
$from = "info@XXXXX.com";
$from_name = "DesignHQ";
$subject = "Contact Form";
$to = $_POST['email'];
// collect data
$body = "";
foreach($_POST as $key => $val)
if($key != 'captcha')
$body .= ucfirst($key).": ".$val."\\r\
// construct MIME PLAIN Email headers
$header = "MIME-Version: 1.0\
$header .= "Content-type: text/plain; charset=utf-8\
$header .= "From: $from_name <$from>\r\
Reply-To: $from_name <$from>\r\
// send email
$mail_sent = mail($to, $subject, $body, $header);
I am really clueless about fixing it. Please help me
Sorry for the very late reply. It was a problem in my PHP code.
Yes, It is.
I got the solution, it is working now.
Is this just a contact us form that will send an email to you?
I see that you have solved your problem. I'm only posting out of interest because I've just had the same problem with my site. Was this a problem with your PHP code or was it (like mine) related to mail configuration and firewall issues?