Somewhere I read (not exactly where) on where the correct place is to add this to the smarty.php file so that it does not mess with the HTML emails.
At the very end of the file is the email handler:
Code:
#
# Smarty object for processing mail templates
#
$mail_smarty = $smarty;
It should be added
after this:
Code:
#
# Smarty object for processing mail templates
#
$mail_smarty = $smarty;
$smarty->load_filter("output","trimwhitespace");