fromName

Jesse James

Member
Hello,

I have noticed that when testing a campaign the from name (fromName) is not the same, it picks the client Name as fromName, but when the campaign is sent the fromName is what the client putted when composing the campaign.
so I have done some change on this file: mailwizz/apps/customer/controllers/CampaignsController.php
from lien: 1304 to 1313 change them to this:

// $customer = Yii::app()->customer->getModel();
// $fromName = $customer->getFullName();
//
// if (!empty($customer->company)) {
// $fromName = $customer->company->name;
// }
//
// if (empty($fromName)) {
// $fromName = $customer->email;
// }

This is actually did solve my issue, now when clients testing there campaign before sending them
on the test email the fromName is what they picked while composing the campaign.

My question is, those changes should not effect any other stuff on the application, right ?

Please let me know
Thanks
 
Hi,

Thanks for pointing this out, i have fixed it in dev version, from:
PHP:
        $customer = Yii::app()->customer->getModel();
        $fromName = $customer->getFullName();
       
        if (!empty($customer->company)) {
            $fromName = $customer->company->name;
        }
       
        if (empty($fromName)) {
            $fromName = $customer->email;
        }

to

PHP:
        $customer = Yii::app()->customer->getModel();
        $fromName = $campaign->from_name;
       
        if (empty($fromName)) {
            $fromName = $customer->getFullName();
            if (!empty($customer->company)) {
                $fromName = $customer->company->name;
            }
            if (empty($fromName)) {
                $fromName = $customer->email;
            }
        }

Thanks.
 
Back
Top