So, first off i am completely new to PHP, i am more into the design side of web development. I have a client that is needing an email form with a upload file script. Currently i am getting this error;
Warning: mail() [function.mail]: SMTP server response: 503 RCPT first (#5.5.1) in D:\Hosting\5080907\html\englishlaundry\send-email-form.php on line 27
We encountered an error sending your mail, please notify webmaster@YourCompany.com
This is the link;
http://www.stealthstyledesigns.com/englishlaundry/approvals.html
Here is my code;
<?php
$sendTo = "tkfrench1@gmail.com";
$subject = "Approval";
$to = $_REQUEST['sendto'] ;
$from = $_REQUEST['Email'] ;
$name = $_REQUEST['Name'] ;
$headers = "From: $from";
$subject = "Web Contact Data";
$fields = array();
$fields{"Name"} = "Name";
$fields{"Company"} = "Company";
$fields{"Email"} = "Email";
$fields{"Project ID"} = "Project ID";
$fields{"Comments"} = "Comments";
$body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From: noreply@YourCompany.com";
$subject2 = "Thank you for contacting us";
$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible. If you have any more questions, please feel free to contact us at";
if($from == '') {print "You have not entered an email, please go back and try again";}
else {
if($name == '') {print "You have not entered a name, please go back and try again";}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: http://www.stealthstyledesigns.com/englishlaundry.com/englishlaundry/thanks.html" );}
else
{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; }
}
}
?>
The $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible. If you have any more questions, please feel free to contact us at"; is working, but i am not receiving an email at the send to email.
You will probably have to explain this to me in layman's terms as this is the first time i have tried this. I am sure it is something simple. Thanks in advance for any help.