I was unable to get HTML mail to use a template properly, so I have a mymodule_mail function that sends emails when a response is required from the user
function billiondollar_mail($key, &$message, $params) {
global $base_url;
$message['headers'] = array(
'MIME-Version' => '1.0',
'Return-Path' => '[email protected]',
'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
'From' => 'XXXX <[email protected]>',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
I have a switch case on $key
that loads in html header and footer plus the email body.
I'm wondering if there's some way I can make the system emails (some sent via trigger/actions and the registration confirmation ones) use that same system. Right now they are in plain text, which is incongruous with the rest of the system.
If I can get them using that hook function I will need to know what $key
value it would have and how to insert the message content.. presumably one of the $params