Posted by plach on March 13, 2009 at 3:35pm
Jump to:
| Project: | Mime Mail |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (works as designed) |
Issue Summary
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.
| Attachment | Size |
|---|---|
| mimemail_plaintext_arg.patch | 660 bytes |
Comments
#1
This patch partially fixed this issue in simple news http://drupal.org/node/357643
thanks
#2
This 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.
#3
subscribing & reviewing
#4
Works... 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
#5
Unless you are the maintainer you really shouldn't mark as won't fix.
Maybe sgabe can take a look at this?
#6
It 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...
#7
This 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.