If you configure a rule with a HTML body to a fixed value in the rules ui everything works fine. But if you populate the body field via a parameter all HTML tags are stripped away.
Define a body parameter which displays a form before the rule is executed. With vbo for example.

Than you can use the formated text value as a parameter but all the HTML tags are stripped away.

We need to set sanitize to TRUE to avoid this.
In mimemail.rules.inc
'body' => array(
'type' => 'text',
'label' => t('Body'),
'description' => t("The mail's message HTML body."),
'sanitize' => TRUE,
),
Comments
Comment #1
marcusx commentedHere is a patch for this...
Comment #2
sgabe commented#1814098: Email sent by Rules doesn't use MimeMail settings and #1816930: MIME Mail and Mail System Configuration marked as a duplicate of this.
Comment #3
adam_b commentedYes, this appears to fix my problem in #1814098: Email sent by Rules doesn't use MimeMail settings - many thanks :)
Comment #4
rahulshah_1988 commentedHi,
Since I am new to the drupal I am not sure how to add the patch. Can I just add the line in the file 'mimemail.rules.inc' ? My server is not local I log in to the admin and see the drupal files.
Comment #5
marcusx commented@rahulshah_1988
Yes you can add the line manually to your file.
Off topic info:
With a one line change this is ok, but often there migth be more complicated changes and than it is much easier to use the patch. It is also a good practice to keep all the patches somewhere in your project so you can reapply them if there is an update to the module and the change hasn't gone in yet. And you always can check which changes you have done to contrib projects. This is extra important if you have more than a few patches.
You can read more about appling a patch here http://drupal.org/patch/apply and here http://drupal.org/node/1399218.
Comment #6
sgabe commentedPatch in #1 committed, thanks!
Comment #7
rahulshah_1988 commentedI checked MIME MAIL. I think it works fine I have an option in the Action of rules module saying that 'Send HTML mail'. I suppose I have to manipulate $node to get the value in html format. If I print $node using php code it shows me an array of list values in which I can see my field buried in HTML format.
Now How do I access that value from $node? Any idea?
Comment #9
mykola dolynskyiYears passed and this problem still exists.
I have killed 3 days figuring out why markup I pass to event breakes to HTML special characters
Please, change it to FALSE or expose as option to RuleAction
Custom module solution: