Hi,
When mail are sent with the messaging system (my tests are made with html mails), the "from" (and Reply-To using the same variable) are malformed. When using gmail to see mails, no problems, but in Thunderbird accentued characters in [name] are replaced by some characters like é.
The format_from function in messaging.mail.inc must apply mime_header_encode function to name before returning informations to have correct values.
$tokens = array(
- '[name]' => $name,
+ '[name]' => mime_header_encode($name),
'[mail]' => $mail,
);
Mhm... And I think a better workaround will be to separate name and mail values in settings, to be sure to apply mime_header_encode to name, even if it's not a token...
For example, if I insert in the "messaging_mail_sender_format" the following string :
Un été en Inde [mail]
The string "Un été en Inde" will be malformed at display ("Un été en Inde"), because with my patch, I don't apply mime_header_encode on. Maybe a regex to retrieve the first part of the "from" and apply encoding can do the trick ?
Comments
Comment #2
titouilleComment #3
titouilleMaybe better like this ? but It seems hard because maybe some users want to use specific name/email pattern to send their mail.
This pattern work nicely when pattern is "[name] <[email]>":
But I think the best solution will be to separate name and email to apply mime_header_encode only to name before build the final "from" string...