I'm trying to use actions as part of a workflow that would automatically send out an email with html formatting out whenever a node of a certain content type is published using workflow and actions modules. Although my send module has no problem doing this when using the "Send to a Friend" sub-module, when I try reproduce the same functionality through the actions module I can only generate plain text email.s
I looked at the action_send_email function in the actions.inc file and I discovered that the problem is that all the html is bring stripped out of the node body before it is sent at line 327:
'%body' => strip_tags($node->body)
First, could this strip_tags function be removed or is it necessary for some reason?
Second, if the strip_tags function is removed and then the body, now including html, was sent to the drupal_mail function, would this work? I had assumed the actions module was taking advantage of the mime mail module I had installed, but looking at the drupal_mail function in the api, I'm no longer as confident. Do I need to create a whole new action to send the info to a function in the the Send or Mime Mail module?
Comments
Comment #1
davecormier commentedfunny. i have the same issue.
Comment #2
mennonot commentedIt's been a while since I posted this issue, but I believe what I did to solve it was add this function to the mimemail.module from the mime mail module
You can then select this new "Send Email using Mime Mail" action as part of a workflow.
Comment #3
mennonot commentedThis "Send Email using Mime Mail" action was working great for me in 5.x, but I recently upgraded the site to 6.x. I've got the mime mail module installed, but this action is gone. I tried using the plain "Send Email" action, but it strips out html tags in the %body when it gets emailed out.
I realize this might be an issue for the mime mail module, but I thought I'd try posting it in this thread first since this is one of the only ones that mentions the existence of a "Send Email using Mime Mail" action.
Comment #4
pomliane commentedThis version of Actions is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.