Skip to content
Advertisement

PHP mail encoding issue

i found an issue with php mail sending. I need to encode the mail in UTF-8. The subject works fine, but the message is corrupted. This is my code

JavaScript

And this is how the mail looks like

Subject Nábor – Kolombooo From tvkolombooo@gmail.com Message T2Rwb3bEm8SPIG5hIG7DoWJvcjpLb2xvbWJvb28uCgoKRGlzY29yZDpLb2xvbWJvb28jMzI1Ny4KClbEm2s6MTU=

Advertisement

Answer

The problem seems to be that you are encoding your message as base64:

Change this:
base64_encode("Odpověď na nábor:" .$name.".nnnDiscord:".$discord.".nnVěk:".$vek);
To this:
"Odpověď na nábor:" .$name.".nnnDiscord:".$discord.".nnVěk:".$vek;

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement