Closed (outdated)
Project:
HTML Mail
Version:
7.x-2.65
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 07:47 UTC
Updated:
29 Sep 2020 at 20:47 UTC
Jump to comment: Most recent
As I said in title, htmlmail.tpl.php is ineffective on "Welcome (awaiting approval)" mail in profile settings.
Maybe a bug?
Comments
Comment #1
pillarsdotnet commentedPlease provide a step-by-step way to replicate the problem, starting with a clean install of Drupal 7.
Comment #2
epiphanydigital commentedSame issue. The template is applied when using this module's admin page to send a test email, but it is not used for any of the user account emails and defaults to regular mimemail.
Step 1. Install Drupal
Step 2. Install MailSystem
Step 3. Install MimeMail
Step 4. Install HtmlMail
Step 5. Create a .tpl file based on the one provided with HtmlMail
Step 6. Create a text format for HtmlMail.
Step 7. Send a test email from the HtmlMail admin page and check to make sure it works. So far so good.
Step 8. Set HtmlMail as system wide default for the MailSystem module.
Step 9. Go through the reset password or create new account processes or any other Drupal core account prompt that issues an email.
Step 10. Check your email to see that the htmlmail.tpl.php file has not been applied.
Comment #3
authintmedia commentedI'm facing the same problem, when I send the test email it works perfectly, giving me the desired template and look, however, no matter what I do, it does not add template to user module generated mail.
Comment #4
vegantriathleteHave you copied htmlmail.tpl.php into your theme?
What have you name your custom tpl? Have you named it something like htmlmail--user_register.tpl.php?
Have you cleared cache?
Comment #5
Bestpoint commentedI have the same problemen. I used the template htmlmail.tpl.php but that won't work. I cleared the cache more than once
Comment #6
bitcookie commentedI solved this by deleting all the template files in the htmlmail module folder.
I think since the htmlmail module has a htmlmail--user--password_reset.tpl.php and htmlmail--user.tpl.php, it uses them instead of your template declared htmlmail.tpl.php.
If you don't want to hack the module, you'd have to explicitly re-declare those template files in your theme, so adding htmlmail--user--password_reset.tpl.php and htmlmail--user.tpl.php in your theme folder. That's really lame and messy if you want just one template for all your emails though.
Comment #7
jackdaniel9 commentedUp What is the solution ?
Comment #8
jackdaniel9 commentedComment #9
jackdaniel9 commentedIn template.tpl.php
function YOURTHEME_preprocess_htmlmail(&$variables) {
template_preprocess_htmlmail($variables);
$variables['body'] = check_markup($variables['body'], 'full_html');
}
Comment #10
jackdaniel9 commentedComment #11
golubovicm commentedbitcookie's solution works! Thanks a lot, it's live savior.
Comment #12
salvisComment #13
salvis