1

Does anyone know how to send HTML email using the Rules module? This was a pretty common task in Drupal 7, and I think the rule was included with the Mime Mail module.

The Drupal 8 version of Mime Mail doesn't seems to integrate with the Rules module.

1

The Drupal 8 version of Mime Mail doesn't seems to integrate with the Rules module.

This question and the follow-up comment seem to imply that Rules integration with Mime Mail is NEEDED in order to send HTML email with Rules. That's not true. Drupal core doesn't support HTML email, so you need an add-on module like Mime Mail if you want to send HTML email. But if you have Mime Mail installed, then you can send HTML email from ANY source, INCLUDING Rules. If you follow the Mime Mail Quick Start documentation you will get this working in just minutes.

There is also a complete example at https://www.drupal.org/docs/8/modules/d8-rules-essentials/examples/email-examples/sending-html-email showing how to send HTML email from Rules using Mime Mail.

Mime Mail integration with Rules allows Rules to use the ADDITIONAL features provided by Mime Mail which are not part of Drupal core or part of other email modules. But this additional integration is not needed unless you want to use those Mime Mail features. For example, the ability to add attachments, or to specify a plaintext email body that is different from the HTML body. Those are Mime Mail specific features.

Mime Mail is not completely ported to D8 yet but there is a patch that ports the Rules support at https://www.drupal.org/project/mimemail/issues/2928965 If you need these additional features I suggest you contribute to that issue.

2
  • 1
    Business Rules has a HTML Email support that seems to work well. – liquidcms Jan 29 '20 at 15:40
  • as of today, I get too many errors with Business Rules to utilize it. – jasonflaherty 2 days ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.