Author Topic: Disable HTML mail  (Read 490 times)

Offline JanusSim

  • Newbie
  • *
  • Posts: 4
Disable HTML mail
« on: July 14, 2017, 08:24:33 PM »
Does anyone know how to completely disable HTML mail in roundcube.
Not in the editor/composer which I did on install, and would prefer to remove.
But to make incoming HTML mail always be converted to plain text?
If both are sent, then only display the plain text, or lacking it, convert the HTML mail to plain text.

I would really like to never see another HTML mail from now on.

Hoping someone knows how.

JanusSim. {Because Janus was already taken.}

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1,915
Re: Disable HTML mail
« Reply #1 on: July 15, 2017, 02:28:52 AM »
In the settings section, preferences > displaying messages untick "display html"
Roundcube Plugins: Sieverules, SpamAssassin Prefs, and more…

Offline JanusSim

  • Newbie
  • *
  • Posts: 4
Re: Disable HTML mail
« Reply #2 on: July 15, 2017, 01:40:11 PM »
Sadly, that box is already unchecked.
Would it accomplish anything to check it, save, then uncheck it again and save once more?

It persists in displaying all the HTML stuff anyway.
Which is annoying.
The occasional html mail I can ignore, but it seems that every single web portal is sending it now.

Even with all the HTML mail stuff unchecked, I still get the 'pretty' background colors, the weird indent formatting for quotes, and all the decorations.
Oh man am I hoping that I have missed something.

My install is directly from the main roundcube site.
It went into my own domain on a shared hosting service.
<rant>
For reasons beyond my comprehension they insist atmail is a webmail solution, what a joke.
They actually took down squirrel mail and indirect support for roundcube in favor that junk that autodisconnects after a short while of inactivity.
Anyway, </rant>

MY install is: from the about box.

Roundcube Webmail 1.1.4
Installed plugins
Plugin    Version    License    Source
archive    2.3    GPLv3+    
Attachment Reminder    1.1    GPLv3+    
jqueryui    1.10.4    GPLv3+    
markasjunk    1.2    GPLv3+    
newmail_notifier    0.7    GPLv3+    
redundant_attachments    1.0    GPLv2    
zipdownload    3.0    GPLv3+    

Thank you for the ehlp and your time.


JanusSim {Because Janus was taken.}

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1,915
Re: Disable HTML mail
« Reply #3 on: July 16, 2017, 03:12:18 AM »
it works for me. Do these messages have a plan text part? Also on the mail preview screen or the full view screen you should see 2 icons next to each other one looks a bit like "< >" and the other is 3 lines, these switch between HTML and plain text, are those present? Do they work? Also try with all plugins disabled.
Roundcube Plugins: Sieverules, SpamAssassin Prefs, and more…

Offline JanusSim

  • Newbie
  • *
  • Posts: 4
Re: Disable HTML mail
« Reply #4 on: July 16, 2017, 04:07:51 AM »
it works for me. Do these messages have a plan text part? Also on the mail preview screen or the full view screen you should see 2 icons next to each other one looks a bit like "< >" and the other is 3 lines, these switch between HTML and plain text, are those present? Do they work? Also try with all plugins disabled.

Sadly, I am still getting the multicolored weird layout stuff.
Blue, then green, then red indents instead of simple '>' carats.
According to view source, the message itself is plain text.
The only two arrow like symbols I have are previous/next message.
I have no symbol showing three lines at all, just three dots where the view source is.

Tried with Seamonkey & Firefox.
My opinion of IE/Chrome/Safari etc doesn't need airing here.
I am not in fact all that fond of FF, but at least in it I can kill all the %$&*% tabs.

I am suspecting I might have messed something when I installed it, but I do not recall making any changes other than database and domain when I installed.

Thanks for the effort.


JanusSim {Because Janus was taken.}

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1,915
Re: Disable HTML mail
« Reply #5 on: July 16, 2017, 09:51:25 AM »
it sounds like the option is working as it is meant to and you are seeing the plain text version of the emails. The blue then green etc blocks you refer to you the blockquotes and how roundcube displays previous messages that are included in the mail.

You might be able to alter that behaviour with either changing the styling applied by the skin or using a plugin to alter how the message itself is displayed but I don't think there are any options in rc out of the box to change those blockquotes
Roundcube Plugins: Sieverules, SpamAssassin Prefs, and more…

Offline JanusSim

  • Newbie
  • *
  • Posts: 4
Re: Disable HTML mail
« Reply #6 on: July 16, 2017, 11:58:14 AM »
Darn and lots of other words that are not knitting.
That multi colored *&@# is really annoying, and disconcerting for some of us.
Plain text is so much faster and easier to scan and read both.

Now I get to delve into the guts of another product.
At least this time it isn't C/C++, those languages are really horrid.

Are there any guides out there to where message formatting is done, or do I need to just tinker until I find it?

Also, just tried to look at the plugin list, is there a master list anywhere?
The autofilter is fine if you already know what you are looking for and what it is called.
However, for someone who is just starting and does not know the terminology yet, it is pointless.
I also do not understand composer, so that doesn't help.

I also prefer to go through lists like that myself because it is faster and easier for me.
One of the biggest things like about roundcube is the lack of animation and eye candy.
It would be nice if its websites had a version that did the same.

My gripes are my own however, and my problem.
I thank you for the help.

JanusSim {Because Janus was taken}

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1,915
Re: Disable HTML mail
« Reply #7 on: July 16, 2017, 01:14:01 PM »
A list of roundcube plugins can be found here https://plugins.roundcube.net/

I think the formatting that you do not like is done here https://github.com/roundcube/roundcubemail/blob/master/program/steps/mail/func.inc#L965

Getting around it can be done something like this (note: this is a proof of concept only)
Code: [Select]
class plainmessage extends rcube_plugin
{
    private $_message = null;

    public function init()
    {
        $this->add_hook('message_part_before', array($this, 'message_before'));
        $this->add_hook('message_part_after', array($this, 'message_after'));
    }

    public function message_before($data)
    {
        // store the originial message source
        $this->_message = $data['body'];
    }

    public function message_after($data)
    {
        if ($this->_message && $data['type'] == 'plain') {
            $data['body'] = html::tag('pre', array('style' => 'white-space: pre-wrap;'), $this->_message);
            return $data;
        }
    }
}

You can find some info about plugins here https://github.com/roundcube/roundcubemail/wiki/Plugin-API
Roundcube Plugins: Sieverules, SpamAssassin Prefs, and more…