Many cPanel users encounter the frustration of Horde only showing plain text versions of HTML emails. The root cause lies in Horde's default MIME driver configuration, which prioritizes security over rich content display. While the standard solution suggests modifying mime_drivers.php
, this approach risks being overwritten during cPanel updates.
Instead of editing core files, create a custom configuration file that won't be overwritten:
// Create /usr/local/cpanel/base/horde/horde/config/mime_drivers.local.php
$mime_drivers = array(
'html' => array(
'inline' => true,
'handles' => array('text/html'),
'icons' => array('html.png')
)
);
For non-global solutions where you only need to adjust your own account:
- Log into Horde webmail
- Navigate to Preferences → Mail → Displaying Messages
- Set "Display HTML messages" to "Always"
- Check "Display embedded images" if needed
Server administrators can enforce HTML display globally by adding this to horde/imp/config/backends.php
:
$backends['imap']['preferred_html'] = true;
$backends['imap']['html_image_display'] = 'embedded';
After implementing any solution, test with this sample HTML email (save as test.eml):
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0000"
------=_NextPart_000_0000
Content-Type: text/plain; charset=utf-8
This is plain text
------=_NextPart_000_0000
Content-Type: text/html; charset=utf-8
<html><body><h1>HTML Test</h1><p style="color:red">This should appear formatted</p></body></html>
If the solution works properly, you should see the red formatted text rather than just the plain version.
When working with Horde webmail through cPanel, many developers encounter the frustration of HTML emails rendering as plain text. The default configuration prioritizes security over rich content display, which affects workflow when analyzing marketing emails or troubleshooting HTML templates.
Instead of modifying mime_drivers.php
directly (which cPanel may overwrite), use Horde's personal preferences system. Create or modify this file in your home directory:
// ~/.horde/horde/prefs.php
$_prefs['mime_driver']['value'] = array(
'html' => array(
'inline' => true,
'builtin' => true,
'handles' => array('text/html')
)
);
For system-wide changes that survive updates, create a custom configuration file at:
/usr/local/cpanel/base/horde/config/conf.local.php
With this content:
$mime_drivers = array_merge($mime_drivers ?? array(), array(
'html' => array(
'inline' => true,
'builtin' => true,
'handles' => array('text/html'),
'icons' => array()
)
));
After making changes:
- Clear Horde's cache:
rm -rf /var/cpanel/userhorde/[username]/horde/cache/*
- Test with a known HTML email containing both HTML and plain text parts
- Check browser console for CSP errors that might block external resources
When enabling HTML rendering:
- Horde still applies content filtering, but malicious scripts could execute
- Consider setting
$mime_drivers['html']['block_remote'] = true
to prevent external resource loading - For high-security environments, maintain separate profiles with different settings