Jump to content

Archived

This topic is now archived and is closed to further replies.

Kifebear

I can't get this form to work

Recommended Posts

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

[code]<?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>");
?>[/code]

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

[quote]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>
[/quote]

and this one:

[quote]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>
[/quote]

Thank you for your help!!

Share this post


Link to post
Share on other sites
This line:

[code]$headers = "From: support@maxwho.com\r\n" .[/code]

and this line:

[code]$maxwhoHeaders = "From: $email\r\n" . [/code]

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.