Jump to content

PHP PLAIN TEXT EMAIL TO HTML EMAIL


nazca

Recommended Posts

[img src=\"style_emoticons/[#EMO_DIR#]/excl.gif\" style=\"vertical-align:middle\" emoid=\":excl:\" border=\"0\" alt=\"excl.gif\" /] I need help, I am trying to send a php email as an html email. Below is part of the code
and $orderText represents the actual content.

I am trying to place a three row table with color sent to the customer's email.
The first row is the name, second row the content, and third link back to my site.
How do send this using php.... I tried reading the tutorial, but over my head...
Tried to change the content-type to text/html or text/multipart and still no luck.

Please help..........


if($bSendEmail){
$headers = "MIME-Version: 1.0\n";
$headers .= "From: " . $sEmail . " <" . $sEmail . ">\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
//$headers .= "To: " . $sEmail . " <" . $sEmail . ">\n";
mail($sEmail, $xxOrdStr, $orderText, $headers);
}
// And one for the customer
$headers = "MIME-Version: 1.0\n";
$headers .= "From: " . $sEmail . " <" . $sEmail . ">\n";
//$headers .= "To: " . $custEmail . " <" . $custEmail . ">\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
mail($custEmail, $xxTnxOrd, $xxTouSoo . "\n\n" . $orderText, $headers);
Link to comment
https://forums.phpfreaks.com/topic/12218-php-plain-text-email-to-html-email/
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.