Needs work
Project:
HTML Mail
Version:
8.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
10 Jun 2011 at 09:56 UTC
Updated:
12 Apr 2018 at 19:03 UTC
Jump to comment: Most recent, Most recent file
Attached patch implements pre-filtering message body after concatenation but before applying template. Of course, we could use template for this, but with growing number of templates there will be too much of repeated code, so I've added one more step to settings.
Other changes:
Patch was made from 6.x-2.56.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | htmlmail-pre-filter-1184534-23.patch | 4.65 KB | Utkarsh_Mishra |
| #12 | htmlmail-pre-filter-1184534-12.patch | 4.69 KB | b-prod |
| #11 | htmlmail-pre-filter-1184534-11.patch | 3.88 KB | b-prod |
| htmlmail-2.56-pre-filter.patch | 4.72 KB | dmitriy.trt |
Comments
Comment #1
pillarsdotnet commentedI had this feature in an earlier version but removed it because input already gets pre-filtered by the chosen text input filter.
In other words, current code has the following filter chain:
I'm going to defer this in favor of something like Mailwire.
I do like your other code changes, and will probably incorporate them into the next release.
Comment #2
dmitriy.trt commentedMaybe I'm missing something, but how can we apply pre-filter to "reset password" e-mail and many others sent by user module? For example, we want to convert newlines to P and BR tags, so e-mail wouldn't look like one big piece of text.
Comment #3
pillarsdotnet commentedActually, it would be simpler to just enclose it in
<pre>tags within a template.Comment #4
dmitriy.trt commentedAnd what about URLs and e-mail addresses? They will remain plain text if we just wrap in
<pre>instead of pre-filtering.Comment #5
pillarsdotnet commentedNot if you add an appropriate output-filter.
Comment #6
dmitriy.trt commentedOk, another simple example. Message body already contains HTML, you want to filter out images, but your template contains images too and you want to keep them. How can it be achieved without pre-filter? (Replace "images" with your favorite tag)
Comment #7
pillarsdotnet commentedTemplate can contain php code.
Comment #8
dmitriy.trt commentedOk, I give up, will use template for that. Please, close this feature request after minor changes will be committed (if you're still interested, of course).
And thanks again for good module and such a fast release cycle.
Comment #9
pillarsdotnet commentedApplied to -dev; will be included in next release. And thanks for feedback.
Comment #11
b-prod commentedHere is a patch against current 7.x DEV version.
Comment #12
b-prod commentedPatch below also add a checkbox in admin UI to avoid extra body message process by HTML mail module, in order to advanced pre-filter to work.
Comment #13
stephen_wtd commented3 years later but thanks B-Prod your patch works. I am theming the system mail and post filtering was destroying my mail code - I tried using
<pre>tags but that didnt work. I'm sure this is not the best way to do it but I wonder what everyone else does without using Echo?Comment #14
b-prod commentedYou're welcome. Actually I do not use anymore HTML Mail, because issue queue is too much sleeping.
You could try the Swift Mailer project which is, in my opinion, a very good alternative to HTML Mail or Mime Mail. It has less advanced features but you can easily go further with few lines of code.
Comment #15
salvisWell, if nobody cares enough to RTBC...
Comment #16
Utkarsh_Mishra commentedComment #17
salvisComment #18
salvisComment #22
salvisOk, so #12 needs a re-roll...
Comment #23
Utkarsh_Mishra commentedComment #24
salvisThank you, Utkarsh_Mishra.
D8 must go first, we should not have an upgrade path that removes features.
@RenatoG and @emartoni: Do we want to have this in D8?