You should edit somewhere in /scripts/sendmessage.inc.php
$Message = $html -> do_markup($Message,"post","markup");
At first 5 second look, somewhere over there look should be the point to change something. And have a look in /scripts/addpost.inc.php to see how it normally would handle a html markup.