I'm using a mail function which is sending back a message that is contained within the variable $body. I want to send the message to myself with certain words in bold and a number of break tags.
Here is my code(HEREDOC SYNTAX):
$body = <<<CTS
<h1><b>Order for $name on datevariable</b></h1><br /><br />
<b><u>Administrative Details</u></b><br />
<b>Employee ID:</b> $id<br />
<b>Cost Center:</b> $cost_center<br />
<b>Approved By:</b> $approved_by<br />
<b>Delivery Bldg:</b> $delivery_bldg<br />
<b>Delivery Contact Email:</b> $delivery_contact<br />
<b>Ext:</b> $del_contact_ext<br />
CTS;
For some reason when I receive the email, it looks like this:
<h1><b>Order for James Important on datevariable</b></h1><br /><br />
<b><u>Administrative Details</u></b><br />
<b>Employee ID:</b> 213123<br />
<b>Cost Center:</b> 132123<br />
<b>Approved By:</b> Chris Seckla<br />
<b>Delivery Bldg:</b> 6<br />
<b>Delivery Contact Email:</b> [email protected]<br />
<b>Ext:</b> 56<br />
It fills in the variable values but for some reason ignores the html tags. Can someone please tell me how to fix this?
Also, it is ignoring the break tags and only putting breaks when I leave a line of whitespace. Any ideas on this?