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.

cPanel-generated emails as text instead of HTML?

Discussion in 'General Discussion' started by kpmedia, Jun 19, 2015.

  1. kpmedia

    kpmedia Well-Known Member

    Joined:
    Feb 13, 2011
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    USA, Europe
    cPanel Access Level:
    Root Administrator
    I don't like the HTML messages generated by cPanel for alerts.
    Can this be set back to text-only mail?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    This may be useful to you:
    Home »Server Configuration »Tweak Settings, System section

     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    BTW, whats not to like about these emails?
     
  4. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I'm not the OP and this is an old thread, but in my case, it's twofold. One, I get BOTH plaintext AND html mail, sent as 2 separate mails. And two, the default email's HTML template's style (still) wastes lots of potential screen real estate by enforcing 680px width, as opposed to 100% width. The previous template I used (April 2015) was better in that regard, much more concise by not limiting table width nor introducing wasted space. Just my $0.02.

    Oh, and btw at this point I'd still favor the HTML template over the plaintext, because the plaintext emails are really bad. It looks like HTML tables converted to plaintext without keeping the table format, with every *cell* starting on a new line rather than every *row* starting on a new paragraph or something. I'd rather see plaintext tables, formatted with spaces to represent a table when viewed with a monospaced font. Which is the only sound way to view plaintext in anyway.
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm not sure why you're getting both text and html, but there is a link at bottom to disable html emails. As for real estate, here's 2 screenshots, one from my phone, one from my computer. Both seem to fit ok for me.
    cPemailformatlg.png cPemailformatsm.png
     
  6. cPAndrewHodge

    cPAndrewHodge cPanel UI Developer
    Staff Member

    Joined:
    Dec 10, 2012
    Messages:
    52
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator

    The notification emails are actually sent as multi-part MIME and include the HTML and plaintext in the same email. We leave it to the user's email client to decide how to display it. If you're getting 2 separate emails your client might be configured to split these messages so you may want to investigate your settings and ensure this is what you have intended.
     
    Infopro likes this.
  7. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Ah, seems like I had an alternate email address for the text-only mails, which was in turn forwarded to the main (HTML-enabled) account. So it looked like I got 2 mails, but that's expected behavior. My bad.

    Yes, fitting is not really the issue. I'm talking about the wasted space, see my red markings on your screenshot:
    cPemailformatlg.png

    With relatively little text this isn't bad, but when messages grow and/or when using a mail client with a mail preview-pane splitting the screen real estate, I want to use all the space I have available. Otherwise I have to scroll down to read the entire email, rather than being able to just glance over it in one view. Something like cPemailformatlg2.png uses the space more efficiently, and only requires that the mail doesn't include a specific table width specified in pixels.

    Is there any way for me to remove the '<table width="680px"' from the mail templates? Just clearing the width would solve my issue, but I only found hard reference to '680' in one file in the template dir, in /usr/local/cpanel/etc/icontact_templates/include/styles.tmpl:
    Code:
    [%
        DEFAULT
            font_family         = "'Helvetica Neue',Helvetica,Arial,sans-serif",
            mono_font_family    = "'Courier New', Courier, monospace",
            total_width         = 680, # length needed for Iostat to fit
            left_padding        = 15,
            right_padding       = 15,
            content_width       = total_width - left_padding - right_padding;
    %]
    
    I assume I can just copy the file to /var/cpanel/templates/icontact_templates/include/styles.tmpl
    , but I'm not sure how I should edit the file to reflect I want the width set to "" (empty) or "100(%)", and not "100(px)"?
     
    #7 bouvrie, Jun 1, 2016
    Last edited: Jun 1, 2016
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  9. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    31
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    All right. Thanks anyway!

    (and sorry for bumping an old topic)
     
    Infopro likes this.
  10. cPAndrewHodge

    cPAndrewHodge cPanel UI Developer
    Staff Member

    Joined:
    Dec 10, 2012
    Messages:
    52
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page