Mailing list was displayed in Gmail

Discussion in 'Common issues' started by Support, May 10, 2019.

  1. Support

    Support New Member

    Joined:
    Feb 15, 2019
    Messages:
    2
    Likes Received:
    0
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    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
     
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,264
    Likes Received:
    2,383
  3. Akash Reddy

    Akash Reddy New Member

    Joined:
    May 20, 2019
    Messages:
    10
    Likes Received:
    2
    S.E:
    2019-11-16 20:56:38
    L.T:
    Regular
    L.C:
    1
    @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: Jun 4, 2019
  4. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,264
    Likes Received:
    2,383
    @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;
    });
     

Share This Page