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 script is not capable to send out HTML

Discussion in 'E-mail Discussion' started by Emiliano, Jun 6, 2014.

  1. Emiliano

    Emiliano Active Member

    May 13, 2011
    Likes Received:
    Trophy Points:
    Orlando, Florida, United States
    Thank you in advanced for your help.

    I had a domain on godaddy shared hosting and i had installed a php script that looks like this...
        $to      = '';
        $subject = "Test Email";
        $headers = "Content-Type: text/html; charset=UTF-8";
        // This one works because it is plain
        // $headers = "Content-Type: text/plain; charset=UTF-8";
        // If you set it to text/plain, all messages will work
        $message_working_1 = "test test";
        $message_working_2 = "test test";
        $message_not_working = "test test";
        mail($to, $subject, $message_working_1, $headers));
    Now on godaddy shared it did not work out, so i was thinking there might be something wrong with te server. I moved it all to my VPS and the very same issue persists.

    I have tried many things but to this moment I have not been able to send HTM Content emails.
    Please, help!
    ThAnk you
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you clarify what in particular is not working? For instance, is the email sending out at all, or is it sending and not using the correct format?

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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