Jump to content
thirty bees forum
  • 0

Email notifications - encoding problem


Question

Posted

I have a TB 1.4 with use of PHP mail() function and my customers get messages with (polish) characters completely messud up. Is there any option in TB to set encoding or is it purely PHP server related?

 

Example for a test message:

SHOULD BE: "To wiadomość testowa"

IS: "To wiadomo=C5=9B=C4=87 testowa"

Just imagine how messed up might be a message for/from a client when it's full of polish characters ;)

 

8 answers to this question

Recommended Posts

  • 0
Posted (edited)
8 minutes ago, the.rampage.rado said:

If you edit the templates you must save them in Unicode format. I had the same issue wile back with Bulgarian.

But I edited them in the TB Background Office Translation menu :|

I've tried to send a test message from a test-shop on my secondary domain, where I had not changed/edited any notification and still the same problem. 

Edited by tomek
  • 0
Posted

Ok, so I think that the problem is on the server side - maybe the PHP mail() function. I managed to successfully set up the smtp and the emails started to look "normally"  ;) 

So yo think I shall contact my server administrator? 

  • 0
Posted

I had the same problem when I changed to php 8, it seems that they have changed the way the php mail function works, and that's why the mail encoding problems. The only option was to use smtp sending.


In php 7.4 the emails were sent without problems.

  • 0
Posted
9 hours ago, Kynes said:

I had the same problem when I changed to php 8, it seems that they have changed the way the php mail function works, and that's why the mail encoding problems. The only option was to use smtp sending.


In php 7.4 the emails were sent without problems.

I googled a little bit and it looks like the php8 version is more strict regarding email standards. Something about email sections being delimited by \r\n characters, but switftmailer library we are using for sending emails use \n as a delimiter. Or something like that.

Unfortunately, we can't update switftmailer library, as it is no longer maintained. We have to migrate to new email sending library soon (swiftmailer is not PHP8.2 ready anyway), so this problem will be fixed together with it.

Meanwhile you will have to use smtp transport if you are on PHP8 

  • 0
Posted

I had a problem with a non-latin language that the sender was completely encoded. It looked like: 

=?utf-8?Q?=D8=A2=D7=92=D7=9A=D7=9D_A2=D7=92=

The most likely cause was mixed content/encoding. After I removed the underscore it displayed correctly. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...