Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Is Publisher setting EE email notifications to always be sent in HTML?

Status Resolved
Add-on / Version Publisher Lite 1.2.2
Severity Trivial
EE Version 1.7.3

Stephen Tidmore

Mar 18, 2014

Hi Brian,

I’ve been trying to figure out why email notifications that are sent from EE automatically, such as the comment notification email, don’t have any line breaks in them even though the Default Mail Format under the Email Configuration settings in the Control Panel is set to “Plain Text”.

After looking at the raw email source, it looks like the emails are being sent as HTML instead of Plain Text. I haven’t seen this happen on other sites that don’t use Publisher and I’m wondering if line 47 on the /publisher/libraries/Publisher/Publisher_email.php file is overwriting the default email type set in the control panel. Here’s that line:

ee()->email->mailtype = 'html';

I could be completely wrong, but if Publisher is overwriting that setting, is there a way around this? I’d prefer to keep the emails in Plain Text for all of these general system notifications for this site.

Thanks for your help!

#1

BoldMinded (Brian)

Annnd, this is why the singleton design pattern sucks. Thanks for pointing this out. I’ll take a look and try to figure out a fix. For now you can just comment out that line.

#2

BoldMinded (Brian)

Stephen, try this version of the file: https://www.dropbox.com/s/w46jcd6u09kn33v/Publisher_email.php

#3

Stephen

Hi Brian,

I swapped out the file on a dev site, submitted a test comment, and got this error on the front end:

A PHP Error was encountered Severity: Notice Message: Undefined property: EE::$email Filename: comment/mod.comment.php Line Number: 2814

Fatal error: Call to a member function EE_initialize() on a non-object in /path/to/system/expressionengine/modules/comment/mod.comment.php on line 2814

#4

BoldMinded (Brian)

I updated that link with a new file, try it instead.

#5

Stephen

This one looks good so far. Thanks Brian.

#6

BoldMinded (Brian)

Sweet! Closing the ticket.

Login to reply