Closed (works as designed)
Project:
Mime Mail
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2009 at 15:35 UTC
Updated:
22 Jun 2010 at 11:44 UTC
mimemail_prepare won't accept $plaintext = FALSE argument when determining recipient's text mail preference (moreover there is a typo in the above comment), the attached patch will accept any value except TRUE.
| Comment | File | Size | Author |
|---|---|---|---|
| mimemail_plaintext_arg.patch | 660 bytes | plach |
Comments
Comment #1
marcus_clements commentedThis patch partially fixed this issue in simple news http://drupal.org/node/357643
thanks
Comment #2
jdwfly commentedThis patch applied fine for me.
I'm not sure if this fixes the issue but I was directed to apply this patch from #401014: Simplenews does not take the recipient's text mail preference into account. Seems to work like advertised. I suggest to incorporate this into the module.
Comment #3
miro_dietikersubscribing & reviewing
Comment #4
miro_dietikerWorks... true... BUT
Still some thoughts and two ways to go.
===
A: We define TRUE / FALSE to be definitive overrides
So a user won't be able to override these settings then ans even if he chose "Plaintext mail only" he will receive HTML mail, if someone calls the api that way.
That's how it is currently which may be completely RIGHT.
We should make some comment better to understand the API.
===
B: Make TRUE the only definitive override to degrade while FALSE leading to user consideration.
This leading to the situation that no (enforced) HTML only mails might be sent.
That's what you're asking for -- because of a API misuse (Current case A) of simplenews.
Simplenews could simply call with $plain=NULL in case of HTML source.
Finally i strongly encourage to fix the API usage of simplenews instead of redefining mimemail APIs.
Related issue to make this change not needed:
#581326: Mimemail integration wrong
Comment #5
jdwfly commentedUnless you are the maintainer you really shouldn't mark as won't fix.
Maybe sgabe can take a look at this?
Comment #6
miro_dietikerIt is very important to have this API working exactly this way:
TRUE to explicitly set plaintext to TRUE
FALSE to explicitly set plaintext to FALSE
NULL to have mimemail decide the user properties.
You can see simplenews corrected its usage of the interface so this is a stable API definition.
#401014: Simplenews does not take the recipient's text mail preference into account
I was investigating this inter-module issue and took by far enough time to find the correct solution.
So let's see how sgabe will explain you the situation...
Comment #7
sgabe commentedThis issue was about a possible workaround related to a bug in Simplenews, which has been fixed in Simplenews. Since it's not broken anymore, don't need to fix it. I am marking this issue as by design.