Jump to content


Photo

I can't get this form to work


  • Please log in to reply
2 replies to this topic

#1 Kifebear

Kifebear
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 August 2006 - 09:55 PM

This form works, but it sends the information in duplicates and then keeps emailing the same form information.

<?php
@extract($_POST);
$returnReason=stripslashes($returnReason);
	$to= $email;
	$subject="Maxwho Return Request for Order Number $orderNumber";
$headers = "From: support@maxwho.com\r\n" .
       
     
$customerMessage = "

Dear $firstname,
We have recieved your RMA Form and our customer service department will be back to you shortly. &nbsp;If you have not recieved a response from our customer service team within two businesss days, please respond to this email or call us at (360) 576-8047 (ext. 11).  

Thank you,
        
Maxwho.com

</html>";

$maxwhoTo= "support@maxwho.com";
$maxwhoSubject="Maxwho.com RMA for $orderNumber";
$maxwhoHeaders = "From: $email\r\n" .
      
     
$maxwhoMessage = "

Order Information 

Order Number: $orderNumber
Customer: $firstname $lastname


Order Date: $orderDate
Product Name: $prodName
Product Code: $prodCode

Return Type: $requestType
Return Reason: $returnReason

Customer Information 


Name:  $firstname $lastname
Organization: $organization
Street Address: $street
City: $city
State: $state
ZIP/Postal Code: $ZIP
Phone: $phone
         
</html>";
mail($to, $subject, $customerMessage, $headers);
mail($maxwhoTo, $maxwhoSubject, $maxwhoMessage, $maxwhoHeaders);
echo ("<table cellpadding='0' cellspacing='0' border='0' class='productListings'> <tr><td class='header'><h2> RMA Form Recieved </h2></td></tr><tr><td align='left'>
<br>
<p>We have recieved your RMA Form and our customer service department will be back to you shortly. &nbsp;If you have not recieved a response from our customer service team within two businesss days, please respond to the email you will recieve shortly.</p>
               <p>Thank you,<br />
               Maxwho.com<br><br><br><br></p>
			</td></tr></table>");
			?>

This is what the email looks like that I keep receiving:

Dear test,
We have recieved your RMA Form and our customer service department will be back to you shortly. &nbsp;If you have not recieved a response from our customer service team within two businesss days, please respond to this email or call us at (360) 576-8047 (ext. 11). 

Thank you,
       
Maxwho.com

</html>



Dear test,
We have recieved your RMA Form and our customer service department will be back to you shortly. &nbsp;If you have not recieved a response from our customer service team within two businesss days, please respond to this email or call us at (360) 576-8047 (ext. 11). 

Thank you,
       
Maxwho.com

</html>


and this one:

From: heather.warneke@maximoproducts.com
[mailto:heather.warneke@maximoproducts.com]
Sent: Tuesday, August 22, 2006 2:42 PM
To: support@maxwho.com
Subject: Maxwho.com RMA for 12121212



Order Information

Order Number: 12121212
Customer: test test


Order Date: 08/22/06
Product Name: test
Product Code: test

Return Type: exchange
Return Reason: test

Customer Information


Name:  test test
Organization: test
Street Address: test
City: test
State: WA
ZIP/Postal Code: 789456
Phone:
       
</html>



Order Information

Order Number: 12121212
Customer: test test


Order Date: 08/22/06
Product Name: test
Product Code: test

Return Type: exchange
Return Reason: test

Customer Information


Name:  test test
Organization: test
Street Address: test
City: test
State: WA
ZIP/Postal Code: 789456
Phone:
       
</html>


Thank you for your help!!

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 22 August 2006 - 10:51 PM

This line:

$headers = "From: support@maxwho.com\r\n" .

and this line:

$maxwhoHeaders = "From: $email\r\n" .

Should end in a semicolon, not a period.  What's happening is you are concatenating your message body onto your headers, then also including it in the body, so it appears as though the message is being sent twice.

#3 Kifebear

Kifebear
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 August 2006 - 11:32 PM

That worked! Thank you so very much!  8) You rock!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users