I am trying to write a code for my mail body. i have a php file in called mailfunction.php.
In that file i have created a variable which has my html code as follow
$message_body ="<html><body>"
."<table class='tg' style='border-style: dotted;'>"
."<tr><td class='tg-3zav'>Civilité</td><td class='tg-3zav'>" . strip_tags($titre) . "</td></tr>"
."<tr><td class='tg-3zav'>Prénom</td><td class='tg-3zav'>" . strip_tags($prenom) . "</td></tr>"
."<tr><td class='tg-3zav'>Nom</td><td class='tg-3zav'>" . strip_tags($nom) . "</td></tr>"
. "</table></body></html>";
But unfortunatly my mail received mail didn't encode the htlm tags. I have received some text contained html tags which are not encoded as follow
<table class="tg" style="border-style: dotted;">
<tr>
<th class="tg-3zav">Civilité</th>
<th class="tg-3zav">M</th>
</tr>
<tr>
<td class="tg-3zav">Nom</td>
<td class="tg-3zav">Frank</td>
</tr>
<tr>
<td class="tg-3zav">Prénom</td>
<td class="tg-3zav">Betrix</td>
</tr>
</table>
Is there any idea to write this html code in the php file?