Hi, I’m trying to code my clients contact form using PHP. I’ve little/ no PHP experience so would really appreciate the help. I think it’s related to the ‘mail’ in the following line of code:
$success = mail($webMaster, $emailSubject, $body, $headers);
When i use the form on the live website i’m given the following error:
Warning: mail() [function.mail]: SMTP server response: 550 [email protected] No such user here in C:\Inetpub\vhosts\amoraebridal.co.uk\httpdocs\contact_form.php on line 25
I’d really appreciate some help from you guys if you have the time, Ive been at this a couple of days now and I’m not getting anywhere. Thanks for your time and help!! See my entire PHP code below:
<?php /*subject and email variables*/ $emailSubject = 'Amorae Bridal Contact Form'; $webMaster = '[email protected]'; /*gathering data variables*/ $nameField = $_POST['name']; $phoneField = $_POST['phone']; $dateField = $_POST['date']; $commentField = $_POST['comment']; $body = <<<EODName: $nameField
Phone Number: $phoneField
Wedding Date: $dateField
Comments: $commentField
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /*Results render in HTML*/ $theResults = <<<EOD Untitled Document Please work this time... EOD; echo "$theResults"; ?>