cPanel-generated emails as text instead of HTML?

bouvrie

Active Member
Apr 6, 2012
36
6
58
cPanel Access Level
Root Administrator
BTW, whats not to like about these emails?
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.
 

Infopro

Well-Known Member
May 20, 2003
17,091
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
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
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
 

AndrewH.

Well-Known Member
Dec 10, 2012
52
3
83
cPanel Access Level
Root Administrator
...I get BOTH plaintext AND html mail, sent as 2 separate mails...

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.
 
  • Like
Reactions: Infopro

bouvrie

Active Member
Apr 6, 2012
36
6
58
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.

As for real estate, here's 2 screenshots, one from my phone, one from my computer. Both seem to fit ok for me.
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)"?
 
Last edited: