• PHP Help PHP Coding
  • Help please!! Warning: mail() [function.mail]: SMTP server response: 503 RCPT first (

Hello, I am a beginner when it comes to this so please bear with me.
I used a template for my website; xml with deep linking sort of website. According to the creator, all I had to was work with the contact form variable and the php should work as is. But here's what I got when I tested it:

Warning: mail() [function.mail]: SMTP server response: 503 RCPT first (#5.5.1) in D:\Hosting\5972300\html_files\blackvelvet_contact.php on line 33

Warning: mail() [function.mail]: SMTP server response: 503 RCPT first (#5.5.1) in D:\Hosting\5972300\html_files\blackvelvet_contact.php on line 37
&emailstatus=1

Below's the php code

<?php

/*

SET THE VARIABLES

*/

$contactTo = $POST['contactTo'];
$contactFrom = $
POST['contactFrom'];
$contactSubject = $POST['contactSubject'];
$contactMessage = $
POST['contactMessage'];

$userTo = $POST['userTo'];
$userFrom = $
POST['userFrom'];
$userSubject = $POST['userSubject'];
$userMessage = $
POST['userMessage'];

// Split the contactTo emails
$contactToArray = explode(",", $contactTo);

/*

EMAIL THE INFO

*/

// Loop through each of the contact emails
for ($i = 0; $i < sizeof($contactToArray); ++$i) {

// Send an email to each of your emails
mail($contactToArray[$i], $contactSubject, $contactMessage, "From: ".$contactFrom);

}

// Send a confirmation email to the user
mail($userTo, $userSubject, $userMessage, "From: ".$userFrom);

echo '&emailstatus=1';

?>

    I read that before posting (amongst many other posts on the issue at hand, but I'm still lost)... I have no idea what is meant by

    "If a RCPT command appears without a previous MAIL command, the server MUST return a 503 "Bad sequence of commands" response."

    As I posted earlier, I am a beginner, so please bear with me. If the quote above has some answer, I am not seeing it. Please explain it to me. I will be eternally grateful!

      In case more info maybe needed, here's my contact.xml file:

      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <CONTENT>

      <!-- Set all of your forms -->
      <FORM_CONTENT>

      <FORM>
      	<heading>Name</heading>
      	<multiline></multiline>
      	<required>true</required>
          <validate></validate>
          <restrict>letters</restrict>
          <form_tip></form_tip>
      </FORM>
      
      <FORM>
      	<heading>Surname/Last Name</heading>
      	<multiline></multiline>
      	<required>true</required>
          <validate></validate>
          <restrict>letters</restrict>
          <form_tip></form_tip>
      </FORM>
      
      <FORM>
      	<heading>EMAIL ADDRESS</heading>
      	<multiline></multiline>
      	<required>true</required>
          <validate>email</validate>
          <restrict></restrict>
          <form_tip></form_tip>
      </FORM>
      
      <FORM>
      	<heading>SUBJECT</heading>
      	<multiline></multiline>
      	<required>true</required>
          <validate></validate>
          <restrict></restrict>
          <form_tip>Please note the subject of your email</form_tip>
      </FORM>
      
      <FORM>
      	<heading>COMMENT</heading>
      	<multiline>true</multiline>
      	<required>true</required>
          <validate></validate>
          <restrict></restrict>
          <form_tip>Leave your comment here</form_tip>
      </FORM>
      
      <FORM>
      <heading>Contact Number</heading>
      	<multiline></multiline>
      	<required>true</required>
          <validate></validate>
          <restrict></restrict>
          <form_tip>080xxxxxxxx/ 080xxxxxxxx/ 018xxxxxx</form_tip>
      </FORM>

      </FORM_CONTENT>
      <!-- Set all of your forms -->

      <!-- Format the email that will be sent to you. -->
      <CONTACT_EMAIL>

      <!-- The email you'd like the contact information to be sent to. -->
      <to>blah@hotmail.com</to>
      <to>info@blah.com</to>
      <to>blah@hotmail.com</to>
      
      <!-- Where the email should look like it's coming from. -->
      <from>comments@blah.com</from>
      
      <!-- The subject of the email -->
      <subject>Comment from website</subject>
      
      <!-- The message of the email -->
      <message><![CDATA[
      
      You have recieved an email from: **EMAIL ADDRESS**
      
      subject: **SUBJECT**
      
      Comment: **COMMENT**
      
      ]]></message>

      </CONTACT_EMAIL>

      <!-- Format the user's confirmation email. -->
      <USER_EMAIL>

      <!-- The email you'd like the contact information to be sent to. -->
      <to>**EMAIL ADDRESS**</to>
      
      <!-- Where the email should look like it's coming from. -->
      <from>comments@blah.com</from>
      
      <!-- The subject of the email -->
      <subject>Blah website comment confirmation</subject>
      
      <!-- The message of the email -->
      <message><![CDATA[
      
      Your email has been successfully sent to [email]comments@kuddycosmetics.com[/email]
      
      
      
      Your comment: **COMMENT**
      
      
      
      You will be contacted within the next 48 hours to discuss the contents of your email.
      
      Thank you and have a great day!
      
      
      Sincerely,
      
      Blah
      ]]></message>

      </USER_EMAIL>

      </CONTENT>

        Write a Reply...