As I said in title, htmlmail.tpl.php is ineffective on "Welcome (awaiting approval)" mail in profile settings.

Maybe a bug?

Comments

pillarsdotnet’s picture

Please provide a step-by-step way to replicate the problem, starting with a clean install of Drupal 7.

epiphanydigital’s picture

Version: 7.x-2.8 » 7.x-2.65

Same 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.

authintmedia’s picture

I'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.

vegantriathlete’s picture

Have 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?

Bestpoint’s picture

I have the same problemen. I used the template htmlmail.tpl.php but that won't work. I cleared the cache more than once

bitcookie’s picture

I 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.

jackdaniel9’s picture

Up What is the solution ?

jackdaniel9’s picture

Priority: Normal » Major
Issue summary: View changes
jackdaniel9’s picture

In template.tpl.php

function YOURTHEME_preprocess_htmlmail(&$variables) {
template_preprocess_htmlmail($variables);
$variables['body'] = check_markup($variables['body'], 'full_html');
}

jackdaniel9’s picture

Priority: Major » Normal
golubovicm’s picture

bitcookie's solution works! Thanks a lot, it's live savior.

salvis’s picture

salvis’s picture

Status: Active » Closed (outdated)