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: Ability to default send from address on all module generated email to EE default return email addres

Status Resolved
Add-on / Version Publisher 1.6.1
Severity Critical
EE Version 2.8.1

Nathan Pitman

Feb 08, 2015

We’re using the Postmark (http://postmarkapp.com) service to send emails generated by EE using the SMTP option to relay all emails through their servers. We discovered however that this is tripping up the system generated approval/denial emails sent by Publisher as the author email addresses do not necessarily have sender signatures set up in Postmark.

I wondered if there would be a possibility of a flag to set Publisher to default the sender email address to the standard EE webmaster email address for such situations?

#1

BoldMinded (Brian)

I’m not 100% sure what you mean, but I’m assuming overriding the from email address? If so, find src/Service/Email.php and add this:

if ($replyTo = ee()->config->item('publisher_email_reply_to'))
        {
            $this->setReplyTo($replyTo);
        }

        if ($replyName = ee()->config->item('publisher_email_reply_name'))
        {
            $this->setReplyName($replyName);
        }

I don’t want to add this to the settings page, its already too bloated.

https://www.evernote.com/shard/s9/sh/ac7be0aa-f1c9-48b8-8ac4-d079b7a42556/6f5441d298b1900fa9c63a9154500a47

#2

BoldMinded (Brian)

This of course means you need to add $config[‘publisher_email_reply_to’] = ‘whatever’; and $config[‘publisher_email_reply_name’] = ‘foo’; to your config.php file.

#3

Nathan Pitman

Thanks Brian, to confirm this will prevent Publisher from trying to send ‘as’ the the member that is approving or denying the post and will instead send as the email address specified in the config?

Can you just confirm whereabouts in the Email Class this code block should reside?

#4

BoldMinded (Brian)

Yep. Take a look at the screenshot, it shows the lines of code on the left.

#5

BoldMinded (Brian)

Added to the 1.6.3 release.

Login to reply