I know this is an older thread, but I came across it trying to do the same ... I started using http://drupal.org/project/htmlmail and realized that I really don't need 3 modules for this. .. here is a quick snippet for those trying to do this in an easier way:
function mymodule_mail_alter(&$message){
$message['headers'] = array_merge(
$message['headers'],
array(
'MIME-Version' => '1.0',
'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
)
);
if(!is_array($message['body'])){
$message['body']=array($message['body']);
}
foreach($message['body'] as $k=>$v){
$message['body'][$k]=str_replace(array("\n","\t"),array('<br>',' '),$v);
}
}
source
share