backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Sending messages in Cyrillic and PHP 8 #6305

Open amilenkov opened 10 months ago

amilenkov commented 10 months ago

I'm finding a problems when sending messages in Cyrillic with Contact form (as well as with Webform) on a Backdrop CMS site:

The message is received from the sender's email and the Cyrillic text reads normally when reading the message in Thunderbird / Windows 10 email client.

However, when receiving the message by an email client on an Android smartphone (the e-mail client is K9 Mail), the Cyrillic text is replaced with unintelligible characters.

Here is an example of the K9 email client for Android:

�������� Test (abc@email.com) �������������� ���������������� �� ������ ������������������ ���� �������������� https://example.com/contact.

�������������� ���������� ���� �������� Test: 12345678

�������� 3 Test 1 PHP 8.3

The same error is when reading the same message through Roundcube web-based e-mail that is part of CPanel's web server applications, Cyrillic in messages is also unintelligible:

Тест Test (abc@email.com) изпрати съобщение чрез страницата за контакти https://example.com/contact.

Телефонен номер на Тест Test: 12345678

Тест 3 Test 1 PHP 8.3

In both examples, it can be seen that the problem affects only the part of the text that is in Cyrillic, but the Latin is read normally. The problem affects both the Subject and the body of the message.

This problem only occurs when the PHP version of the web server is changed to PHP 8 (the problem occurs equally with PHP 8.0, PH 8.1, PHP 8.2).

I am using shared hosting from the leading Bulgarian hosting provider with cPanel where it is possible to change PHP version of the hosting account for the domain by tools of cPanel.

If the web server is running PHP 7.4 (and all earlier versions) there is no problem and Cyrillic messages sent through the message form are read normally.

For test and comparison, I also sent a message via a Webform module message form:

When running the web server with PHP 7.4, there are no problems again.

Changing the PHP version to 8.0 results in the following message sent via Webform

�������������� ��� 11 �������������� ���� ������������, �������������� 19 , 2023 - 5:39pm

���������� ���� ����������������������:

����������: Test ������, ��������������: Test ��������������: 12345 Email: abc@email.com ������������ ���� ��������������: ���������������� � ���� ��������������:

Test web server in this test is running PHP 8.0. If the web server in is running PHP 7.4 there are no problems with Cyrillic content in messages.

The output shows for me that it seems the problem is valid for both the contact form module and the messages sent through the webform module.

I am not using modules SMTP, Mime Mail, Mail System. Only core message system.

There are NO error messages in admin/reports/dblog.

Thanks for attention and for great Backdrop CMS. I am confident that this problem will be solved.

I should note that I first shared about this on the forum:

https://forum.backdropcms.org/forum/sending-messages-cyrillic-and-php-8

A forum participant commented that this is probably a bug related to PHP 8.

https://forum.backdropcms.org/forum/sending-messages-cyrillic-and-php-8?page=0%2C0#comment-5833

I was advised to report the issue here and with this post I have reported it.

argiepiano commented 10 months ago

@amilenkov I know nothing about switching alphabet, but there are a few postings online that may help perhaps? It looks like this may also be a configuration issue with the server, or htaccess. Can you please take a look:

klonos commented 10 months ago

@amilenkov can you please send the exact same test email from php7.4 and then from any php8 version, and then inspect the email headers of each email? Then please share the findings here so we can compare and see if there's any relevant header missing or different.

This is what I've tested on my local:

  1. install a vanilla Backdrop 1.x site on php 7.4
  2. enable the Contact module and configure the email for default contact form
  3. go to /contact and send an email using Cyrillic words for subject/body
  4. inspect the email received
  5. destroy the website
  6. install a vanilla Backdrop 1.x site on php 8.2
  7. repeat steps 2 to 4 above

Here's what I got:

PHP 7.4:

Content-Transfer-Encoding: 8Bit
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
From: admin@example.com
MIME-Version: 1.0
Message-ID: 2pySFYpf3_11W93nyv9xf5C34NwbpvfMcKbHQyyUoFk=@mailhog.mailhog.lando
Received: from localhost by mailhog.mailhog.lando (MailHog)
          id 2pySFYpf3_11W93nyv9xf5C34NwbpvfMcKbHQyyUoFk=@mailhog.mailhog.lando; Mon, 27 Nov 2023 18:14:05 +0000
Reply-To: admin@example.com
Return-Path: <admin@example.com>
Sender: admin@example.com
Subject: =?UTF-8?B?W1dlYnNpdGUgZmVlZGJhY2tdINC00LDQstCw0LnRgtC1INC/0LXRgNC10LLRlg==?=  =?UTF-8?B?0YDQuNC80L4sINGH0Lgg0YbQtSDQv9GA0LDRhtGO0ZQ=?=
To: someone@gmail.com
X-Mailer: Backdrop CMS

admin (https://6305.lndo.site/accounts/admin) sent a message using the
contact form at https://6305.lndo.site/contact.

це тестовий електронний лист на кирилиці

PHP 8.2

Content-Transfer-Encoding: 8Bit
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
From: admin@example.com
MIME-Version: 1.0
Message-ID: doQrbt3h3tDGb_hmNN-CgywfYZMwUXmjBmStgfqDuxs=@mailhog.mailhog.lando
Received: from localhost by mailhog.mailhog.lando (MailHog)
          id doQrbt3h3tDGb_hmNN-CgywfYZMwUXmjBmStgfqDuxs=@mailhog.mailhog.lando; Mon, 27 Nov 2023 18:22:20 +0000
Reply-To: admin@example.com
Return-Path: <admin@example.com>
Sender: admin@example.com
Subject: =?UTF-8?B?W1dlYnNpdGUgZmVlZGJhY2tdINC00LDQstCw0LnRgtC1INC/0LXRgNC10LLRlg==?=  =?UTF-8?B?0YDQuNC80L4sINGH0Lgg0YbQtSDQv9GA0LDRhtGO0ZQ=?=
To: someone@gmail.com
X-Mailer: Backdrop CMS

admin (https://6305.lndo.site/accounts/admin) sent a message using the
contact form at https://6305.lndo.site/contact.

це тестовий електронний лист на кирилиці

I don't see any problem, and the Cyrillic portion of the text is displayed just fine.

amilenkov commented 10 months ago

Yes, I'll do it and post a report.

indigoxela commented 10 months ago

@amilenkov there may be a quicker check, that helps us to understand.

As Cyrillic works fine on your site with PHP 7.4, but not on 8.x, it might be that the multibyte package is missing. Can you verify on your status page (/admin/reports/status), that Unicode library is PHP Mbstring Extension?

Extended PHP info is available on /admin/reports/status/php, search for mbstring.

My suspicion is that a php extension's missing in your 8.x setup.

amilenkov commented 10 months ago

I am sending screenshots of the pages obtained by entering both addresses. /admin/reports/status /admin/reports/status/php Firefox_Screenshot_2023-11-28T15-00-43 499Z Firefox_Screenshot_2023-11-28T14-58-06 300Z

amilenkov commented 10 months ago

Hello fellows,

I did tests in this manner:

I registered two new domains and created two new test web sites, both with a brand new installation of Backdrop CMS 1.26.1:

https://php74.eu - web server with PHP 7.4 https://php82.eu - web server with PHP 8.2

Once the review is complete and these two websites are no longer needed, I will delete them.

Please visit these links, the home page of both describes how to send a message and log into an correspondent contact form email inbox to verify the problem.

If you want to log in as administrators to these web sites to check administrative settings and do additional tests (as user1) use the following credentials for both sites:

Username: admin Password: backdropcms.org

If you want, you can define additional categories and email addresses for the contact form to test in the environment you want. To do this, you can log in to the sites as user 1.

Upon request, I will also send access data for login to the hosting accounts control panels (cPanel).

The problem can be seen in the screenshot of the contact email on the second site (https://php82.eu) - screenshot is attached here.

Firefox_Screenshot_2023-11-29T09-00-47 055Z

I emphasize that the problem with the Cyrillic alphabet depends on the e-mail client used - for example, if the messages are sent to Gmail or an e-mail client such as Thunderbird in a Windows environment - there are no problems with the Cyrillic alphabet.

Problems occur if using a web-based email with a Linux server (like the one in the screenshot) or an Android email client (I personally use the K9 mail app).

And since many of my clients use their domain emails on a Linux web server, they face the above problem and cannot read messages sent to them through the contact forms on their web sites.

This prevents me from upgrading their web servers to PHP 8, and I keep all web-based email clients on PHP 7.4, but upgrading to PHP 8 is becoming more and more urgent.

Thanks a lot in advance!

indigoxela commented 10 months ago

@amilenkov please note that the credentials you posted here are wrong for both sites. No login possible.

However, you're asking a lot here. Personally, I'd never leave a real email address on an unknown site.

I emphasize that the problem with the Cyrillic alphabet depends on the e-mail client used

Sorry, but fixing problems with specific email clients is far out of scope. Remember, we're doing this here in our spare time, so we rely on issue reporters to provide steps to reproduce, and that the problem really has to do with Backdrop CMS.

I did quick check on one of my dev sites with the Contact module on PHP 8.2 and everything displays fine.

This is a part of the email header (correct):

Subject: [Website feedback] Ein testmail zu email encoding
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Backdrop CMS

The text I used was: Брзи тест кодирања у е-поруци са Бацкдроп ЦМС веб локације

Here's a screenshot of the resulting email in Thunderbird:

contact-mail

I'm aware that you hoped to find more help here, but I suspect, there's a problem with either your site with PHP 8.x, or with your email client. Without steps to reproduce we're puzzled here.

amilenkov commented 10 months ago

indigoxela I am very sorry for the situation.

Please note that I am not a professional developer, I am mainly graphic designer and prepress specialist, and from such a position I also develop sites, and in your work as a professional software developer I manage to navigate only partially as a self-taught person.

I may and surely have violated accepted rules and etiquette, but in no case did I do it maliciously, but due to ignorance.

There is one inaccuracy in your message. The procedure I suggested to diagnose the problem does not at any point require you to enter your real email address.

When you log into both sites as User 1 you log in with a username

admin

and password

backdropcms.org

and you don't need to enter an email at all.

To send a message you don't need to enter your real email of a sender, I myself did the tests with a fictitious email address abc@mail.com

Messages are sent by the system to email test@php74.eu and test@php82.eu respectively, but these are not your addresses and you do not disclose any personal information.

Access to these mailboxes is from addresses

https://php74.eu:2096/ https://php82.eu:2096/

And you don't need again to enter your e-mail there either, you enter as a username

username: test@php74.eu for one site and username : test@php82.eu f or the second.

For both e-mails, the password is the same and matches that of the admin user 1 for both sites -

Password is again

backdropcms.org

I understand that the testing method I offer is unusual and this is due to my limited knowledge of your professional work, but I do not see anything complicated or dangerous for your personal security, and at no time do you need to enter your personal email.

Please do not be put off by the unusual way of the procedure, it takes very little effort to see the problem by entering the e-mail inbox for which I have written above how it can be done.

Please note that I have indicated that I also receive the messages correctly when I open them through Thunderbird or if I send them to an address in Gmail.

I checked and reset username and password for User1 for both sites, checked them to login and they work, you can login to the site as admins as User 1, I repeat, for both sites these credentials are:

username admin

password backdropcms.org

I know your time is valuable and you spend your spare free time to maintain and build Backdrop CMS. Thank you very much for that.

But please note that I am trying to do the same in my perhaps non standard but conscientious and honest way. I'm trying to solve a problem that certainly doesn't affect only me, but a large number of other users who send messages in Cyrillic, and maybe other non-Latin alphabets have the same problem - Hebrew, Armenian, etc.

At the very least, I made the effort to purchase two domains and configure two hosting accounts with the installation and setup of Backdrop CMS so as to help solve a problem that is certainly not just mine.

indigoxela commented 10 months ago

@amilenkov I understand your frustration. It's not that I don't want to help you, the only thing I request is a way to reproduce a problem without third party software involved. We can't fix problems with email clients, we can only fix bugs in Backdrop CMS.

Two people tried to figure out how to reproduce the problem you're seeing, two people failed. Not what you expected, I know, but that's all we currently can offer. Maybe the forum might be a better place to find the cause.

amilenkov commented 10 months ago

@indigoxela

In 2020 I tried to help you by trying to diagnose problems for i18n. And you helped me to write the transliteration code from Bulgarian to Latin.

I had then created a test site with the domain i18n.site, sent you a username and password, and you logged in multiple times, including discussing setting up a multilingual site homepage and other aspects of how the individual i18n modules work.

I just didn't know that what was permissible in 2020 is no longer valid today.

But I reserve the right to try to prove that the problem is not with the email client software. If I succeed, I will write here again.

I already wrote in the forum, but I was advised to post an issue here.

https://forum.backdropcms.org/forum/sending-messages-cyrillic-and-php-8?page=0%2C0#comment-5849

argiepiano commented 10 months ago

@amilenkov, given the fact that two people have been unable to reproduce the problem locally, I'm wondering if this problem may be due to some mis-configurations of your shared hosting, email server configurations, and/or php. I also use shared hosting, and at times their tech support has been successful at identifying issues I had missed. Have you been in touch with your shared hosting provider about this problem?

Thank you for setting up the testing environment - the main issue with this is that it's pretty hard to use common debugging tools on code that lives outside your local environment, and it's also very hard to tweak server and php configurations on servers you have limited access. Over the next few days I'm going to try setting up something similar to what you describe in my own shared hosting account to see if this is something I can reproduce.

Until we find a way to reliably reproduce this in an environment we can tweak and control, we are a bit stuck here.

argiepiano commented 10 months ago

@amilenkov re, Thunderbird, have you tried this?

https://support.mozilla.org/en-US/questions/1267709

klonos commented 10 months ago

I know your time is valuable and you spend your spare free time to maintain and build Backdrop CMS. Thank you very much for that.

But please note that I am trying to do the same in my perhaps non standard but conscientious and honest way. I'm trying to solve a problem that certainly doesn't affect only me, but a large number of other users who send messages in Cyrillic, and maybe other non-Latin alphabets have the same problem - Hebrew, Armenian, etc.

@amilenkov let me get this clarified: we want to help you, as we do with everyone in our community. We would help anyone, regardless if the issue was affecting a single person or many people, and regardless of the issue affecting people suing Latin or non-Latin alphabets. It's all open source love here 🙂 ❤️

Please note that I have indicated that I also receive the messages correctly when I open them through Thunderbird or if I send them to an address in Gmail.

Yes, and this is why everyone here is suggesting that there is nothing we can do on the Backdrop side for this problem. This is what @indigoxela is saying with this:

We can't fix problems with email clients, we can only fix bugs in Backdrop CMS.

The bottom line is that if you can see the email properly in major email clients (either apps/software or email-based), then Backdrop must be doing the right thing and sending the email encoded with proper (unicode) headers and everything required in order to identify the text as unicode and handle it accordingly (and I have tested and confirmed that in various php versions in my earlier comments in this thread).

This seems to be an issue with how specific email clients are handling these emails on their side, or as both @indigoxela and @argiepiano indicated, a problem with how PHP is configured on the server that is running the web-based email client. There is very little that we can do if that is the case (which it seems to be).

PS: I was also able to find this relatively recent, relevant thread about k9 mail, although I didn't find anything useful in that thread (other than that people seem to be having issues with Cyrillic/UTF8 and that specific app): https://forum.k9mail.app/t/some-email-contents-not-correctly-displayed/4447 ...have you tried opening an issue in https://forum.k9mail.app @amilenkov?

PPS: I used to run Roundcube in my personal email/web server, but not any more. I think that my wife's department are using it at work. I will try to repeat my tests and send her a test email with Cyrillic from a Backdrop site in the morning (8-12 hours from now) and see if it works as expected (that Roundcube instance is configured to handle Greek and English well, so I'm assuming it will be handling Unicode properly).

amilenkov commented 10 months ago

Thank you very much to everyone who commented on the issue, but please don't waste any more time on this issue.

I became convinced of two things:

First, my approach to make a test environment is inadequate and unprofessional, I apologize for that. Second, the problem is not with Backdrop CMS and therefore I should not look for a solution here.

But it might be helpful to share something I discovered afterwards. Maybe this will help someone else having the same problem.

The issue with cPanel's web-based e-mail (Roundcube) is solved by a setting that is hidden deep in the settings and I have never had to use it before.

The setting is Default Character Set and defaults to ISO-8859-1 (Western European). When changed to UTF-8 and the Cyrillic problem is solved. I have used this web based mail for years without having to set up with this option. I assume with the move to PHP8 this should now be done for every email account created.

This solves the issue of Cyrillic messages my clients receive from the website contact form to email addresses with the same domain with Roundcube cPanel web based email service, which was the main and most important issue.

So thanks again everyone for the comments and advice, and I will look for a solution in communication with my hosting provider and in the web server settings.

And once again I apologize for wasting your time in this discussion.

argiepiano commented 10 months ago

@amilenkov so glad to hear you could solve this problem partially. The mystery remains as to why switching the php 8 produced this.

Reporting apparent malfunctions is never a waste of time! So thank you! And I thank you for going the extra mile to try to help people reproduce this, and for taking the time to follow through. This is really how open source thrives.

klonos commented 10 months ago

I second what @argiepiano said above @amilenkov ...no need to apologize. You didn't do anything wrong, and your troubleshooting method was what you could do - we are not here to judge whether the tools/services people have at their disposal are professional or not - we should help everyone with dignity and respect.

Glad that we have gotten to the bottom of this. We now know for sure that our assumptions (that this is a problem with the server configuration and the email client software) were correct; and we now have this thread to help others with similar problems in the future. So no waste of time at all.

Anyway, as always, thank you for contributing to our community and for representing Backdrop in your part of the world 🙏🏼 ❤️

Lets just close this issue here and move on 🙂

argiepiano commented 10 months ago

@amilenkov posted some helpful, additional information about this issue. It seems like it's also present in D7, and that SMTP prevents this problem: https://forum.backdropcms.org/forum/sending-messages-cyrillic-and-php-8#comment-5909

So, this may actually be a bug, so I'm going to reopen to keep this in sight.

indigoxela commented 10 months ago

@argiepiano so, are there steps to reproduce now, that we're no aware of? Note: in Backdrop core. Reading the forum comment, I can't figure out, what might happen in B, that causes any problem.

We already checked the mail headers, and they're identical in PHP 7.4 and PHP 8.x.

The Drupal issue is about HTML mails, which core doesn't send at all.

argiepiano commented 10 months ago

are there steps to reproduce now, that we're no aware of?

Not that I'm aware of. But we've had plenty of issues in the queue that at first have seemed impossible to reproduce (I've been on that boat myself; I remember for example the LiteSpeed server issue with cached pages, which seemed at first impossible to explain).

I thought it was worthwhile to reopen this basically because the OP found a way to circumvent the problem by using SMTP (this can offer clues on what's different in the headers between both), and also because, in the same server, D7 had the same problems.

This doesn't mean that you need to spend any more time thinking about or working on this. It's here just for the future.

amilenkov commented 8 months ago

Hello,

I'd like to confirm that the problem described above with Cyrillic messages sent via a PHP function still exists and I'm seeing it now on a dozen different sites with different configurations, including brand new installations. The problem occurs with all PHP versions higher than 7.4 - PHP 7.4 and earlier have no problems with Cyrillic messages.

Today I upgraded a site to Backdrop to version 1.27.0, and while this version adds a lot of nice new things to Backdrop, the Cyrillic message problem persists. I am not re-describing it because it has been described above.

To a large extent, the problem is solved by installing the SMTP Authentication Support module, and for most sites I support, this solves the Cyrillic problem - not only from the contact form, but also messages from Rules, Webform, system messages, etc.

However, I also support a site with Ubercart - the e-store sends various messages of its own, and with this site the SMTP Authentication Support module created problems such as messages from the store not received by the buyer, etc. Not always, but by accident without understanding what caused it.

For now, my solution is to keep this Ubercart site with PHP 7.4 and send the messages not via SMTP Authentication Support, but via the standard core messaging system.

I remain hopeful that this issue will be resolved in the future as I have seen the huge strides Backdrop CMS has made in multilingual support both in core and through i18n since 2016 (I started working with Backdrop CMS in 2016 and at that time I made separate menus and blocks for each language because menus and blocks could not be translated).

Happy and successful 2024 to everyone from the Backdrop CMS team.

indigoxela commented 8 months ago

@amilenkov it's not that we wouldn't want to help you, it's that we can not reproduce the problem.

I tried again sending the exact same (machine translated to Bulgarian, so contains Cyrillic chars) text on both, PHP 7.4 and PHP 8.2 on Backdrop 1.27.0 and the outcome is correct - and identical - on both PHP versions.

So there might be some contrib module involved, that breaks stuff.

Can you please provide a list of mail-related modules you have installed? Like mimemail, mailsystem and the like. Can you also provide you mail setup? Not any credentials or private data, just how you configured sending mails on your sites, where it's broken.

Are you aware how to check mail headers? Mails are text (under the hood) and the mail headers contain meta info. How to check that meta info, depends on your client. We can't provide support re that.

amilenkov commented 8 months ago

@indigoxela

Thank you for your answer!

I suggest we do it like this:

The question is not urgent at all for me. One way or another I have found a way to deal with Cyrillic messages on all the sites I maintain. This problem annoys me probably only because I'm a perfectionist and I like direct and sure solutions, not workarounds.

In the coming weeks, I will prepare as detailed as possible a report on all the data to allow for the reproduction of the problem. Also, I want to do trial installations of Backdrop on different hosting platforms as well, because my current hosting provider wrote to me that the server is configured correctly, but I think it's reasonable to check if the problem will be seen with other hosting companies and web servers.

When I gather enough complete information and answers to the questions you asked, I will write here again. It's not urgent when it happens - then. Thanks again.

amilenkov commented 8 months ago

I think I know how to check mail headers. I'm using Thunderbird and this seems to be done via View » Headers » All

If so, here's an example of a message that has Cyrillic problems:

X-Account-Key: account1
X-UIDL: UID27752-1364749801
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Return-Path: <web@aura-bg.com>
Delivered-To: antony@milenkov.net
Received: from vitek.superhosting.bg
by vitek.superhosting.bg with LMTP
id ICibAx+SqmUvOQAAyA9soA
(envelope-from <web@aura-bg.com>)
for <antony@milenkov.net>; Fri, 19 Jan 2024 17:15:43 +0200
Return-path: <web@aura-bg.com>
Envelope-to: contact@aura-bg.com
Delivery-date: Fri, 19 Jan 2024 17:15:43 +0200
Received: from aurabg by vitek.superhosting.bg with local (Exim 4.96.2)
(envelope-from <web@aura-bg.com>)
id 1rQqas-000Ai9-2P
for contact@aura-bg.com;
Fri, 19 Jan 2024 17:15:42 +0200
To: contact@aura-bg.com
Subject: =?UTF-8?B?W9Ca0L7QvdGC0LDQutGC0LhdIFRlc3QgLyDQn9GA0L7QsdCw?=
X-PHP-Script: aura-bg.com/index.php for 62.73.120.251
  X-PHP-Originating-Script: 2083:system.mail.inc
MIME-Version: 1.0
  Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
  Content-Transfer-Encoding: 8Bit
  X-Mailer: Backdrop CMS
  Sender: web@aura-bg.com
  From: web@aura-bg.com
  Reply-To: antony@milenkov.net
Message-Id: <E1rQqas-000Ai9-2P@vitek.superhosting.bg>
From: web@aura-bg.com
Date: Fri, 19 Jan 2024 17:15:42 +0200

Antony Milenkov (antony@milenkov.net) sent
message through the contact form in
website https://aura-bg.com/contact.

Antoni Milenkov's contact phone number: 123

Test Message in English
Test message in Bulgarian

And as a result here is a screenshot of what is seen in a web based client like Roundcube

Return-Path: <web@aura-bg.com>
Delivered-To: contact@aura-bg.com
Received: from vitek.superhosting.bg
    by vitek.superhosting.bg with LMTP
    id OEibAh+SqmUvOQAAyA9soA
    (envelope-from <web@aura-bg.com>)
    for <contact@aura-bg.com>; Fri, 19 Jan 2024 17:15:43 +0200
Return-path: <web@aura-bg.com>
Envelope-to: contact@aura-bg.com
Delivery-date: Fri, 19 Jan 2024 17:15:43 +0200
Received: from aurabg by vitek.superhosting.bg with local (Exim 4.96.2)
    (envelope-from <web@aura-bg.com>)
    id 1rQqas-000Ai9-2P
    for contact@aura-bg.com;
    Fri, 19 Jan 2024 17:15:42 +0200
To: contact@aura-bg.com
Subject: =?UTF-8?B?W9Ca0L7QvdGC0LDQutGC0LhdIFRlc3QgLyDQn9GA0L7QsdCw?=
X-PHP-Script: aura-bg.com/index.php for 62.73.120.251
    X-PHP-Originating-Script: 2083:system.mail.inc
MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
    Content-Transfer-Encoding: 8Bit
    X-Mailer: Backdrop CMS
    Sender: web@aura-bg.com
    From: web@aura-bg.com
    Reply-To: antony@milenkov.net
Message-Id: <E1rQqas-000Ai9-2P@vitek.superhosting.bg>
From: web@aura-bg.com
Date: Fri, 19 Jan 2024 17:15:42 +0200

Firefox_Screenshot_2024-01-19T15-23-22 538Z

amilenkov commented 8 months ago

The problem with the Cyrillic alphabet that can be seen in the screenshot is only if the PHP version is 8 and higher, with 7.4 the text in Bulgarian is read normally.

amilenkov commented 8 months ago

In this particular test site, I disabled the SMTP Authentication Support module. When I activate it the problem disappears.

There are no other modules related to e-mail and messages on the site, and more specifically there is no mimemail, mailsystem and the like..

indigoxela commented 8 months ago

@amilenkov that it works, when you send via external mail server (that's what the smtp module does), makes me think, that there's some on-server processing of mails on your hosting, that breaks things.

Somewhere between Backdrop and the client (Thunderbird or any other).

Another thing indicating that are header items like the following:

X-PHP-Script: aura-bg.com/index.php for 62.73.120.251
X-PHP-Originating-Script: 2083:system.mail.inc`

Backdrop does not add these lines, they get added on your server.

Additionally I see a header item duplication. From: web@... is added twice (!). Backdrop does not do that, either.

So, please try on different hosting for comparison. Not just a different web on the same hosting, but a completely different hosting provider, if you have one available.

amilenkov commented 8 months ago

Thank you for your time and attention to this issue.

I will try another hosting provider, but before that (if you don't mind) I will share your comments (without personally identifying you) with the current hosting provider.

This is the largest hosting company in Bulgaria with which I have been working since 2005 and I have excellent working relations. They were a very successful Bulgarian startup, but 2-3 years ago they were bought by a large European concern with headquarters, I think, in France.

I think I will wait for their response and explanation of the situation.

Because if there is a bug in the configuration of their servers for PHP 8 and your comment helps them to fix it, it will help not only me but hundreds of thousands of other sites that use these servers.

avpaderno commented 8 months ago

I sent an email to myself from a Backdrop site. I have not received any X-PHP-Script nor X-PHP-Originating-Script header.
I can see the hosting provider uses Exim 4.95, but I do not think that makes the difference.

amilenkov commented 8 months ago

Thank you!