jatin_11 — 2010-05-30T15:57:51-04:00 — #1
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
jatin_11 — 2010-06-19T17:49:30-04:00 — #2
Sorry for the very late reply. It was a problem in my PHP code.
jatin_11 — 2010-05-30T16:58:39-04:00 — #3
Yes, It is.
I got the solution, it is working now.
chris_upjohn — 2010-05-30T16:30:02-04:00 — #4
Is this just a contact us form that will send an email to you?
systemick — 2010-05-30T17:55:25-04:00 — #5
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?