Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When sending email using the conditional actions, we get several unwanted chars in the email subject
=?UTF-8?Q?your order a beaut=C3=A9
should be
your order a beauté
This seems to be a encoding problem (utf8) of some kind. Help is very much appreciated.
Comments
Comment #1
Island Usurper CreditAttribution: Island Usurper commentedIt looks like the mail subjects should be run through mime_header_encode(), but the output you have there doesn't match what it should be giving.
mime_header_encode() adds
=?UTF-8?B?
to the beginning of the encoded string where yours hasQ?
. I suppose this can happen if you are using a different SMTP library file that implements drupal_mail_wrapper().Comment #2
TR CreditAttribution: TR commentedMoving this to a support request as it doesn't seem like a bug. The standard Drupal mail function will pass the Subject through mime_header_encode(), as noted in #1. This is essential because RFC 2822 governing mail states that only printable ASCII must be used for the subject. So when you use é anywhere in the subject, that triggers the base64 encoding of the subject. Again as noted in #1, what you are seeing is *not* the way the Drupal default mailer encodes the Subject line, so it seems you have plugged in a different mailer. Without more information from you, it seems clear that your different mailer is what is causing the problem.
Comment #3
TR CreditAttribution: TR commented