The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php mail script is not capable to send out HTML

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

  1. Emiliano

    Emiliano Active Member

    Joined:
    May 13, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida, United States
    Hello,
    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...
    Code:
    ------------------------------------------------------------------------------------
    <?php
        $to      = 'info@domain.com';
        $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 somesite.com test";
        $message_working_2 = "test somesite.com-different-domain.com test";
        $message_not_working = "test somesite.com 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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    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.
     
Loading...

Share This Page