Jump to content

I can't get this form to work


Kifebear

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!!
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.