Closed (fixed)
Project:
HTML Mail
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2010 at 06:11 UTC
Updated:
6 Apr 2011 at 03:24 UTC
We needed a simple and consistent way to bypass the htmlmail (and just send default plain text email). By wrapping the alter hook code, and checking for a variable $message['no_htmlmail'] we make it possible to skip htmlmail if the $message['no_htmlmail']) parameter is set in any email template.
function htmlmail_mail_alter(&$message) {
// Skip htmlmail if no_htmlmail property is set
if (!isset($message['no_htmlmail'])) {
[original code goes here]
}
}
This will not have any effect on existing installations, so please consider the solution and add it to the module if you think it's a nice feature...
Comments
Comment #1
sifuhall commentedI would like to see this added as well.
Comment #2
jboeger commentedThe htmlmail module has been working great for notifications, but suddenly it's breaking the Contact module (simple contact sends.)
How do I implement the code above? What goes in: [original code goes here]
from the code above?
I just need to override for the contact module. Thanks if you can help!!
Comment #3
pillarsdotnet commentedThis feature is available in the 7.x version. Will consider backporting to 6.x.
Comment #4
pillarsdotnet commentedThe 6.x-2.x branch is now stable. I'm therefore closing all open 6.x-1.x issues.
Re-open if there is some reason that 6.x-2.x doesn't work for you.