Mailing list was displayed in Gmail

Support

New Member
Hi,
Anyone faced the same problem as me? How can I remove the mailing list from the details?
This happen in my Gmail.

upload_2019-5-10_12-34-40.png
 

Akash Reddy

New Member
@Support @twisted1919 Please advise if it is the line 1261 in the file? (under the list-unsubscribe) I can't seem to find the hook in this version.

And this is the only line that shows up when ctrl+F for Line-Id


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' => $headerPrefix . 'Customer-Uid',   'value' => $customer->customer_uid),
                array('name' => $headerPrefix . 'Customer-Gid',   'value' => (string)intval($customer->group_id)), // because of sendgrid
                array('name' => $headerPrefix . 'Delivery-Sid',   'value' => (string)intval($server->server_id)), // because of sendgrid
                array('name' => $headerPrefix . 'Tracking-Did',   'value' => (string)intval($server->tracking_domain_id)), // because of sendgrid
                array('name' => 'List-Unsubscribe',               'value' => $listUnsubscribeHeaderValue),
                ***** THIS LINE ?? ****array('name' => 'List-Id',                        'value' => $list->list_uid . ' <' . $list->display_name . '>'),
                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
                array('name' => 'Precedence',                     'value' => 'bulk'),
 
Last edited:

twisted1919

Administrator
Staff member
@Akash Reddy - that's the correct line. and the hook still works as advertised.
in apps/init-custom.php :
PHP:
<?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-Id') {
            unset($emailParams['headers'][$index]);
        }
    }
    return $emailParams;
});
 
Top