Header Issue

How do i remove/modify these Headers and parts?
1. X-XXX-Mailer: SwiftMailer - 5.4.x
2. --_=_swift_v4_1499670196_d1759452be8e8761ccc138f143a4a138_=_

And what if i remove these Headers ?
1. X-XXXX-EBS:
2. X-Report-Abuse:
3. Precedence:

Here I mostly Want to change the X-Mailer Part to my own.
 

sendmedialtd

Active Member
Bringing this up again, so I've updated to the new version and I've edited the SendCampaignsCommand.php file to remove the unwanted headers. How ever for the lfie of me i cant find the

x-dddj-mailerSwiftMailer - 5.4.x

header in the file, iv tried searching for the name mailer and the file but the words its finds are not to do with the header. This is my header code:

PHP:
$headerPrefix = Yii::app()->params['email.custom.header.prefix'];
            $emailParams['headers'] = array(
                array('name' => $headerPrefix . 'Campaign-Uid',   'value' => $campaign->campaign_uid),
                array('name' => $headerPrefix . 'Subscriber-Uid', 'value' => $subscriber->subscriber_uid),
                array('name' => 'List-Unsubscribe',               'value' => $listUnsubscribeHeaderValue),
                array('name' => 'X-Report-Abuse',                 'value' => 'Please report abuse for this campaign here: ' . $reportAbuseUrl),
                array('name' => 'Feedback-ID',                    'value' => $this->getFeedbackIdHeaderValue($campaign, $subscriber, $list, $customer)),
                // https://support.google.com/a/answer/81126?hl=en#unsub
                
            );

This is some of the headers showing in the emails:

x-dddj-subscriber-uid zm613o2q3o713
x-dddj-mailer SwiftMailer - 5.4.x
x-dddj-campaign-uid gr246d525824f

Is that header being added somewhere else now or am i going blind?

Thanks,
Mike
 

clickt

New Member
I would like to know how to comment out display_name for list id.

Original
array('name' => 'List-Id', 'value' => $list->list_uid . ' <' . $list->display_name . '>'),

My version

array('name' => 'List-Id', 'value' => $list->list_uid . ),

Correct ?
 

twisted1919

Administrator
Staff member
@clickt - please see https://forum.mailwizz.com/threads/remove-list-unsubscribe-in-header.3859/#post-24976
And you can do:
PHP:
Yii::app()->hooks->addFilter('console_command_send_campaigns_before_send_to_subscriber', function($emailParams, $campaign, $subscriber, $customer, $server){
    foreach ($emailParams['headers'] as $index => $header) {
        if ($header['name'] == 'List-Unsubscribe') {
            $emailParams['headers'][$index]['value'] = 'your value here';
        }
    }
    return $emailParams;
});
 

pcready.cl

New Member
To modify the field "_=_ swift_" in Mailwizz 2.x you must modify line 426 of this file

Code:
/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php
 
Top