I'm trying to send some emails with Messaging + Messaging PHPMailer + Notifications. I want to format the final html of the template, to add some style, but I' don't get where I have to edit this.
The README of messaging_phpmailer says:
- This module does NOT use drupal_mail. This is done on purpose so that mail can be sent as both plain text and HTML.
If you wish to override drupal_mail you will have to implement drupal_mail_wrapper() yourself to call the
messaging_phpmailer_send() function. Also you will need to set the stmp variable.
Well, if I implement drupal_mail_wrapper, I don't have all email destinations because it only recives $message as parameter, so I think it's a hard way to make this. I want to ask if we can add the way to edit just via hook system. Maybe messaging_phpmailer_send_msg() function is a good point.
/**
* Send mail message to user account. Supports bulk sending
*
* @param $destination
* Single email address
* @param $message
* Message array
*/
function messaging_phpmailer_send_msg($destination, $message, $params = array()) {
module_invoke_all('send_msg_alter', &$destination, &$message, &$params = array());
// Build the message in drupal mail format
$mail = $message->send_method()->mail_build($destination, $message, $params);
return messaging_phpmailer_drupal_mail($mail);
}
In case that there is some way to do this by now, I will appreciate if someone can explain it on the issue.