KeithF Posted April 1, 2010 Share Posted April 1, 2010 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 [email protected] This is the link; http://www.stealthstyledesigns.com/englishlaundry/approvals.html Here is my code; <?php $sendTo = "[email protected]"; $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: [email protected]"; $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 [email protected]"; } } } ?> 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. Link to comment https://forums.phpfreaks.com/topic/197277-why-am-i-getting-this-error/ Share on other sites More sharing options...
ialsoagree Posted April 1, 2010 Share Posted April 1, 2010 An SMTP 503 error is a "mail server requires authentication" error. If you're unfamiliar with how to authenticate, give this link a look: http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm Link to comment https://forums.phpfreaks.com/topic/197277-why-am-i-getting-this-error/#findComment-1035457 Share on other sites More sharing options...
jus098 Posted April 1, 2010 Share Posted April 1, 2010 its mail server error for auth ,.............. Link to comment https://forums.phpfreaks.com/topic/197277-why-am-i-getting-this-error/#findComment-1035561 Share on other sites More sharing options...
KeithF Posted April 1, 2010 Author Share Posted April 1, 2010 Ok so i read through most of the Pear download instructions and i do not understand where to place the Pear folder i downloaded. Told you i was new at this! Can someone help me out with this, please. Link to comment https://forums.phpfreaks.com/topic/197277-why-am-i-getting-this-error/#findComment-1035568 Share on other sites More sharing options...
KeithF Posted April 22, 2010 Author Share Posted April 22, 2010 I'm still kind of lost on how to implement this system. Do i place the pear folder in the root folder through dreamweaver or do i place it somewhere on the server itself through my control panel? Link to comment https://forums.phpfreaks.com/topic/197277-why-am-i-getting-this-error/#findComment-1046641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.