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.
Hi all
When sending a webform submission via email, if the subject contains accented characters (character é
for instance), it is not passed as-is in the email subject field but is changed to é
.
I tried using a hidden form field instead, but the result is exactly the same.
Is there some setting I have overlooked somewhere ?
Thanks !
Comments
Comment #2
Liam MorlandI am not seeing this problem on my server. This is probably caused by UTF-8 characters being interpreted as non-UTF-8. What happens when you send a similar email from your server but not through Drupal? By trying different combinations, you can narrow down where it is happening.
Comment #3
codata CreditAttribution: codata commentedThanks for your comment Liam.
I only have administrator access to Drupal, I don't have direct access to the server.
Have you checked the source of the message ?
Thunderbird will actually "descramble" the badly encoded characters and display them just fine, but in the source you will see the scrambled characters.
The problem is worse with other mail-user-agents. Outlook will descramble the characters if the content-type header is
Content-Type: text/plain; charset=utf-8
. It will not descramble them if the content-type header isContent-Type: multipart/mixed; boundary="blablabla"
.So depending on your mail-user-agent, you will see the subject line scrambled or not, but the source is wrongly encoded in all cases.
Excerpt from two emails, the first one displays fine in Outlook, the second doesn't, and as you can see both are badly encoded :
Original subject is
Inscription à la réunion
Comment #4
Liam MorlandI'm seeing the subject like this:
=?UTF-8?B?Y2hhcmFjdGVyIMOpIGZvciBpbnN0YW5jZQ==?=
.Comment #5
codata CreditAttribution: codata commentedOK so you have proper UTF8 encoding !
That's exactly what I want, but not what I get.
I have :
Drupal 7.54
Webforms 7.x-4.14
Mime Mail 7.x-1.0-beta4+15-dev
Mail System 7.x-2.34+5-dev
Is there some setting (i18n ?) I need to activate somewhere to have the subject encoded in UTF8 ?
Comment #6
codata CreditAttribution: codata commentedI found this report that describes the same bug, but it is for PHPMailer which I don't use (I use Mail System) : https://www.drupal.org/node/1408226