NFWriter Posted November 21, 2008 Share Posted November 21, 2008 I am butting my head against the wall trying to direct direct PHP variables into a table that is sent with the mail() command. I find several examples on the web of intermixing PHP and HTML, including at w3school, but none of them work for me. Here's an exercise that doesn't work, yet the example I lifted it from is very straightforward. <?php $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/")); $message = <<<EOF <html> <body> <table> <tr> Alabam Warehouse Web Order Request Customer Info </tr> </table></body> </html> EOF; mail("[email protected], [email protected]","Order/Quote from AWS web page",$message,"From: [email protected]"); header("location: http://alabamwhs.com/form42818/thankyou.html"); ?> ----------------------------------------------- should send html via PHP through email, but the output I get looks like this instead: <html> <body> <table> <tr> Alabam Warehouse Web Order Request Customer Info </tr> </table></body> </html> I'm at my wit's end to make ANY PHP and HTML work together. Any suggestions? Jim Link to comment https://forums.phpfreaks.com/topic/133589-putting-html-tables-into-mail/ Share on other sites More sharing options...
cooldude832 Posted November 21, 2008 Share Posted November 21, 2008 your headers are not agreeing with your mailer client (Where ever your $to is juno.com) Google php html mail headers and make sure you are valid Link to comment https://forums.phpfreaks.com/topic/133589-putting-html-tables-into-mail/#findComment-694891 Share on other sites More sharing options...
NFWriter Posted November 21, 2008 Author Share Posted November 21, 2008 Make sure I am valid? What does that mean? And the I don't understand this eitgher - (Where ever your $to is juno.com) but I will google 'php html mail headers' I don't understand headers. Link to comment https://forums.phpfreaks.com/topic/133589-putting-html-tables-into-mail/#findComment-695088 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.