Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP mail charset problems

Discussion in 'E-mail Discussion' started by remik, Apr 5, 2007.

  1. remik

    remik Guest

    We recently updated cPanel to Version:
    WHM 10.8.0 cPanel 10.9.0-C138  
    RedHat Enterprise 3 i686 - WHM X v3.1.0  
    There is a problem with mail function in PHP. Now we cannot use ISO-8859-2 charset in emails sent from PHP. This is not specific to any particular script, but whole server. All forms, emails sent from Horde, Squirellmail etc. are sent with chars converted to utf-8.

    A sample script, which sends a wrong email follows:
     mail('','ĄĄĄĄĆĆĆĆĘĘĘĘÓÓÓÓÓŁŁŁŁ',"ąąąą ćććć ęęęę łłłł żżżż źźźź óóóó ",
    ."Content-Type: text/plain; charset=ISO-8859-2\r\n"
    ."X-Mailer: PHP/" phpversion());
    Please help. I checked php.ini files and they look ok. Nothing was changed it the system that could lead to this problem.
    #1 remik, Apr 5, 2007
    Last edited by a moderator: Jan 29, 2010
  2. remik

    remik Guest


    I found, what causes the problem, but still no solution. When running exim with amavisd Polish characters get corrupted. When I turn off amavisd they work fine :-(
    I have the latest amavisd and spamassasin version.

  3. remik

    remik Guest

    FYI: fixed.

    The problem was in perl library called Net:Cmd. New version has a bug, which causes it to encode everything to UTF-8. Every single mail that went through spamassasin was being converted to utf-8 :/

    More info about the bug and a patch can be found at:


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice