Hello,

HTML Mail module works great with system emails and with Mail Editor module emails vs Mime Mail module which I found to have a few issues. However, Mime Mail module recently added a great Rules Integration feature #501722: HTML mail actions for Rules that makes it very powerful. Therefore, I'm currently using a combination of HTML Mail module for system emails and Mime Mail module for emails sent via Rules.

I would like to kindly request for Rules Integration to be considered for HTML Mail module. I hope the patch at #501722: HTML mail actions for Rules would help this implementation. I am not familiar with programming but will be readily available to extensive testing.

Thank you very much in advance!

CommentFileSizeAuthor
#15 htmlmail.rules_.inc_.txt2.16 KBnymo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yoyek’s picture

Subscribing.

pillarsdotnet’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Bumping version -- will consider a backport to 6.x after first getting this working in 7.x.

pillarsdotnet’s picture

Status: Active » Postponed
griz’s picture

+1 for 6.x

pillarsdotnet’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Postponed » Active

Will revisit this shortly.

jddeli’s picture

Thiw is not working.
There is no guidelines

pillarsdotnet’s picture

Assigned: Unassigned » pillarsdotnet
Status: Active » Needs work

jddeli: If course it's not working -- I haven't even written the code yet.

pillarsdotnet’s picture

Bump -- next on the to-do list.

rsbecker’s picture

I have a moderated organic group that is set so mailhandler turns new posts sent by email into nodes that are not published. I have a rule that sends an email to the moderator for each new post, including the node body and a link to edit the node. The rule is now working fine with HTML mail. In debug mode it told me to create two tpl.php files, htmlmail-rules.tpl.php and htmlmail-rules-action-mail.tpl.php.

pillarsdotnet’s picture

Title: Rules Integration / Action: Send an HTML mail » Create sample html--rules.tpl.php file.

Thanks for the feedback.

Renamed the issue accordingly.

pillarsdotnet’s picture

Component: Code » Module compatibility
pillarsdotnet’s picture

Status: Needs work » Active
nymo’s picture

+1 what's the status? I'd like to give it a shot at integrating HTML Mail with Rules, but don't want to be stepping on toes.

pillarsdotnet’s picture

I haven't started this yet; feel free to submit a patch and I'll review it.

nymo’s picture

Version: 7.x-2.x-dev » 7.x-2.60
Status: Active » Needs review
FileSize
2.16 KB

Here's my initial Rules integration. Just drop it in the htmlmail module folder and rename it to htmlmail.rules.inc (sorry about that, but what's the proper way to attach such file? A zip archive for one file?...that's kinda silly.)

    To test:
  • set up a new rule
  • for actions, select under System "Send templated e-mail.",
  • there's a key field, use a single word string for now

In your selected theme directory, create a template with name: htmlmail--htmlmail--[key].tpl.php.

    Caveats/Improvements:
  • allow longer strings (but i guess not too long) for keys
  • add a module select field
  • add some validations for both

What else am i missing? Any comments or suggestions?

pillarsdotnet’s picture

Thanks; will review as soon as I can.

nymo’s picture

Ok, i'm working on some of the improvements and will submit new file when done. I realized that one important feature missing is adding tokens...d'oh!

TR’s picture

Title: Create sample html--rules.tpl.php file. » Rules integration
Version: 7.x-2.60 » 8.x-3.x-dev
Assigned: pillarsdotnet » Unassigned
Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

This will not be done for the D7 version of HTML Mail.

Why is this needed? HTML Mail will work for all email, including email sent by Rules. The only reason to write a new RulesAction for HTML Mail is if there is some HTML Mail feature we want to use in that action that can't be used with the default Rules "Send email" action. Is there?

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)