share reports from-address

nadworks

Active Member
How can I change the from-address and from-name the campaign report is being shared from via the 'share campaign reports' option?
It currently seems to be coming from the individual campaign's email address and from-name, which is a little confusing in my case.
 
@nadworks - the code for this is defined at /apps/customer/controllers/CampaignsController.php in
actionShare_reports_send_email around line 2871

There are a few hooks we can use to modify some of those params, for example, we can use the subject of the email to catch all emails that go our from the system and filter down to find the share campaigns reports, like:
( in /apps/init-custom.php )
PHP:
<?php 

Yii::app()->hooks->addFilter('delivery_server_before_send_email', function($params, $server){
    if ($params['subject'] == Yii::t('lists', 'Campaign reports access!')) {
        $params['fromName'] = 'Your FROM name here';
    }
    return $params;
});
Keep in mind that this function will be called for absolutely any email that goes out from the system, so it will add overhead. Also, not tested.

You can also explain us what you're after, maybe we can come up with a better choice.
 
Thanks.

Here's what I'm trying to achieve: my clients are mostly musicians for whom I'm running the mailing lists. The campaign's from names are usually the artist name or the artist name + News (i.e. "Claire Martin" and "Mike Lindup News" etc.). When I send the campaign reports, the artists and their marketing teams should receive it from my company, or my name, or the platform name, not from themselves, that's irritating at best and - in the case of some orchestras I work with, with larger PR teams who need to get these stats - can lead to these emails being completely ignored since they come from the same source as the campaigns.

A third aspect is that these reports are a good service tool for me as a company. So they should come from me with the option to reply to me (or an email address I set).

I hope this explains it. In any case, sending the reports from the same sender credentials as the campaign to me makes little sense in any scenario.
 
@twisted1919, I hope this made sense. I won't implement your above code due to your own concerns and hope you're considering a permanent tweak to this future for one of the next updates.
 
@nadworks - this didn't make it into 1.9.6 but don't worry, i have added it in our list and once i come up with a solution to this i'll write you here to see if it is acceptable.
 
Back
Top