Closed (fixed)
Project:
Subscriptions
Version:
5.x-2.0-beta11
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2007 at 18:35 UTC
Updated:
8 May 2008 at 19:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
salvisThanks :-)
Currently there's no way to filter out HTML, but I agree that we need it!
Comment #2
gustav commentedI would be in favour of going in the opposite direction and actually sending the notifications as html emails (using the mime mail module, for example).
Comment #3
salvisApply the attached patch and install HTML to text to get a text approximation of your HTML code. However, note, that there are a number of issues with the rendering of HTML to text, the most serious one being http://drupal.org/node/212126, so it's currently usable for testing only, at least as long as you don't apply the patch in that issue. (That patch is for Drupal 6 though, so be prepared to do some massaging to apply it to HTML to text.)
I have briefly looked at Mime Mail, but I'm not convinced that it's stable enough to build on. Also, we would still need to supply text as alternative content (and as far as I've seen, Mime Mail doesn't currently do this, which is unacceptable).
Comment #4
salvisOh, and if you think there's value in having Drupal 6 ready for porting Subscriptions to it, you might put in a word for that patch at http://drupal.org/node/212126 or even review it...
Comment #5
salvisI just had another look at Mime Mail, and apparently it does supply alternative text content, as well as a per-user option to receive text only. I'll think about offering an option to use it if it's present.
Comment #6
JStuckman commentedI'm not sure if this is recommended or supported, but I'm already experimenting with Mime Mail to send out the HTML content in messages. When I set the global enabling option in Mime Mail (Site configuration > Mail > "Use mime mail for all messages"), HTML tags begin passing through to the e-mails.
The e-mails look sort of strange, but I figure I can restyle the e-mails for my own purposes with a little tweaking of the code.
Comment #7
salvisThanks for your feedback.
Now that I think about it again, it's clear that the default templates don't work well with HTML mail. It's probably not possible to tweak them to the point where they would work for both formats, so this is unlikely to work at all...
The text rendering of HTML_to_text is pretty good IMO and it's part of Drupal 6 core, so it may get even better over time.
Comment #8
gustav commentedJStuckman, thanks for reporting your experiences with using mime mail. When you have tweaked the templates to work with HTML emails, please share them with us.
Even if mime mail is not used by the subscriptions module by default, perhaps salvis could include your explanations of how it can be done in a section of the installation instructions.
Comment #9
jfable commentedHello, I may be missing the point, a very good chance of that, but is there something wrong with just stripping with strip_tags()?
Something like this
Comment #10
salvisThe result of just removing tags is not so great. For example. you won't get any links or lists.
Comment #11
icecreamyou commentedSo is there any consensus as to what's happening on this? Are we to use Mime Mail unsupported, is it going to interface with Subscriptions, or will Subscriptions support HTML to Text? And for my live production site, which should I use that can be ready by the end of the weekend?
Comment #12
salvisGet HTML_to_text and apply the patch at http://drupal.pastebin.com/m7c0c23f6. Then install it and Subscriptions will use it.
I have several issues with the D6 drupal_html_to_text(), but only the one truly critical one was fixed, which corresponds to that patch. I've asked chx to apply it to HTML_to_text, and I hope he'll be able to do it soon.
Comment #13
salvisRequires installing HTML to text 5.x-1.1.
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #15
mdowsett commentedi tried applying this patch to the official release of subscriptions 2.0 and both chunks failed...does an update need to be done?
Comment #16
salvisWe have an official release with everything in there.
What makes you think that you need to dig up old closed issues and try to apply patches at random?
Comment #17
mdowsett commentedSorry. I couldn't find any documentation saying that feature was added in the newer version. (maybe I'm blind).
my apologies
Comment #18
salvis#13 says it all.
Is it not working for you?
Comment #19
mdowsett commentedIt wasn't in the new version so I installed it and it is working
Comment #20
salvis5.x-2.x-dev now nags you until you have all the standard modules enabled.
It doesn't specifically say not to look for patches, but I think it ought to be clear enough now.
This is the result of your posting and #253987: Not receiving any subscription email for content updates. Thanks.