monkeybidz Posted February 5, 2011 Share Posted February 5, 2011 I currently use this to send mail: $message = "$quote_num<BR> PU: $city1, $state1. $zip1<BR> DL: $city2, $state2. $zip2<BR> $miles Miles<BR> Qty: $quantity $freight_type<BR> Lifgate: $liftgate<BR> Weight: $weight<BR> $description<BR> Quoted Price: $total_price"; The mail goes through fine, but it shows the <BR> in the meassage. Any help is appreciated! Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/ Share on other sites More sharing options...
Pikachu2000 Posted February 5, 2011 Share Posted February 5, 2011 The message is being sent as plain text, and <br> has no meaning in plain text. Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/#findComment-1170443 Share on other sites More sharing options...
monkeybidz Posted February 5, 2011 Author Share Posted February 5, 2011 So I would need headers if so how? Or can you point me to an example. Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/#findComment-1170447 Share on other sites More sharing options...
Pikachu2000 Posted February 5, 2011 Share Posted February 5, 2011 Scroll down to example #4 and have a look at it: mail Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/#findComment-1170454 Share on other sites More sharing options...
monkeybidz Posted February 5, 2011 Author Share Posted February 5, 2011 I tried that one and all vars just come up as $nameofvar. Do i need to ."$nameofvar". or something? Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/#findComment-1170467 Share on other sites More sharing options...
Pikachu2000 Posted February 5, 2011 Share Posted February 5, 2011 Variables in a single quoted string will not be interpolated, so yes you either need to concatenate them into the string, or use double quotes around the string. Link to comment https://forums.phpfreaks.com/topic/226830-mix-html-into-a-php-mail-function/#findComment-1170469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.