Jump to content

sendmail


ldoozer

Recommended Posts

Can anyone tell me why this is only sending the text but not sending the variables in the email. I have checked that my form method is post and my names in the html are correct.

 

<?php
$to = "[email protected]";
$message = "order: \r\n\r\nCustomer Name: ".$MC_Name."\r\nCustomer Address: ".$MC_Address."\r\nCustomer Postcode: ".$MC_Code."\r\nCustomer Email: ".$MC_Email."\r\nCustomer Phone: ".$MC_Phone."\r\nPlant in: ".$MC_Location."\r\nMessage on Certificate: ".$MC_Message."\r\nGift Name: ".$MC_Gift_Name."\r\nGift Address: ".$MC_Gift_Address."\r\nGift Postcode: ".$MC_Gift_Code."\r\nPayment Method: ".$method."\r\n\r\nEnd of order";
$msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to, "Order", $message, "from: [email protected] \r\n");
?> 

Link to comment
https://forums.phpfreaks.com/topic/71059-sendmail/
Share on other sites

Archived

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

×
×
  • 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.