Mail() function - Trouble with encoding.


  • | 276 points

    Hello, I tried to send mail with polish characters "śćńółęśąśżćźó",
    also I added correct headers "Content-type: text/html; charset=UTF-8" and file encoding
    but in sendmail output logs and on gmail, the message looks like:
    "L>A?L"AlL,ATL>A.L>LLA?LsAl".

    Sendmail output logs:

    17.03.31 16:02:58 ** --- MESSAGE BEGIN ---
    17.03.31 16:02:58 ** To: ***@gmail.com
    17.03.31 16:02:58 ** Subject: test
    17.03.31 16:02:58 ** X-PHP-Originating-Script: 0:index.php
    17.03.31 16:02:58 ** Content-type: text/html; charset=UTF-8
    17.03.31 16:02:58 ** 
    17.03.31 16:02:58 ** śćńółęśąśżćźó
    17.03.31 16:02:58 ** --- MESSAGE END ---
    
    
    17.03.31 16:02:59 >> Date: Fri, 31 Mar 2017 16:02:59 <EOL>
    17.03.31 16:02:59 >> To: ***@gmail.com<EOL>
    17.03.31 16:02:59 >> Subject: test<EOL>
    17.03.31 16:02:59 >> X-PHP-Originating-Script: 0:index.php<EOL>
    17.03.31 16:02:59 >> Content-type: text/html; charset=UTF-8<EOL>
    17.03.31 16:02:59 >> <EOL>
    17.03.31 16:02:59 >> L>A?L"AlL,ATL>A.L>LLA?LsAl<EOL>
    17.03.31 16:02:59 >> .<EOL>
    
    

    Any ideas?


  • administrators
    | 43981 points

    @Savander : I'll check and fix it soon.


  • | 276 points

    Okay, I'll keep track of the topic


  • administrators
    | 43981 points

    0_1491273395263_sendmail.zip

    @Savander : I've made a hotfix for sendmail. To update it:

    1. Download https://forum.laragon.org/uploads/files/1491273395798-sendmail.zip
    2. Extract sendmail.exe to C:\laragon\bin\sendmail\sendmail.exe

  • | 276 points

    Yes! That works :).
    Thank you, for fast reply.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.