mimemail_prepare won't accept $plaintext = FALSE argument

plach - March 13, 2009 - 15:35
Project:Mime Mail
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

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.

AttachmentSize
mimemail_plaintext_arg.patch660 bytes

#1

rayvaughn - March 15, 2009 - 14:29

This patch partially fixed this issue in simple news http://drupal.org/node/357643

thanks

#2

jdwfly - August 12, 2009 - 21:08

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

miro_dietiker - September 16, 2009 - 17:04

subscribing & reviewing

#4

miro_dietiker - September 18, 2009 - 14:18
Status:needs review» won't fix

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

 
 

Drupal is a registered trademark of Dries Buytaert.