List-unsubscribe used in one campaign that has multiple Delivery channels

Discussion in 'Tips and tricks' started by GregKevey, Mar 2, 2019.

  1. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    HI,

    I want to create automation flow where the campaigns will be using multiple delivery channels (sending domains). Kind of "domain warmup factory".

    I did preliminary test everything is working I can even regulate load on each Delivery Servers (Sending Domain). Only one thing I noticed the list-unsubscribe email will be always same./

    Example: I am sending 10 email from email app@daomin1.com and another 10 emails from email att@ domain2.net

    From email will be replaced by the delivery server from email automatically, which is perfect. But in the header of email received on att@ domain2.net ) I see always list-unsubscribe mailto: app@daomin1.com .

    NOt sure if I configured something wrong if so advice on how to fix it ?.
    P.s. In Customer Group settings > Campaigns > "List unsubscribe header email" - I was not able to add [DS_FROM_EMAIL] placeholder .. so test it with the empty and got the same result if there is app@daomin1.com .

    My point is it will be very strange from gamil/yahoo IA point of view if your sending email and list-unsubscribe email are from different domains, isn't it?
     
    Last edited: Mar 3, 2019
  2. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,037
    Likes Received:
    2,343
    I don't think tags are parsed in that area, so you'll have to use a real email address not a tag.

    Just remember that we set the reply-to address and then if the above is set, we set that.
     
  3. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    To be honest you didn't answer my question. When I use multiple delivery servers under the same campaign List-unsubscribe mailto address is always same - shouldn't it change and align to sending each sending domain respectively (Delivery server)? Is it bug or I do something wrong?
     
  4. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,037
    Likes Received:
    2,343
    Sorry if i wasn't clear, not sure how to answer this more precisely.
    My point is that, if each campaign has a reply-to email set in it's configuration, that will be used, so if you have 2 campaigns with two different reply-to addresses, then your list unsubscribe header should be different. if it is not, it is a bug and we should look into it.
    So can you confirm/infirm the above?
     
  5. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    Thank you for prompt reply :
    I have ONE campaign and one reply to address BUT with two delivery server. See screen below
    upload_2019-3-5_16-52-33.png
    upload_2019-3-5_16-54-51.png upload_2019-3-5_16-52-33.png upload_2019-3-5_16-54-51.png
     
  6. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    This one campaign will send 10 emails. 5 will go through DS domain with [SES01.domain.today] and 5 will go through [SES02.domain.store]
    Because I have app@domain.store reply-to address in the campaign there is no issue there.
    For email send trough [SES01.domain.today] DS mailwizz will replace send from email to app@domain.today (this is good), BUT will NOT replace reply to so my email looks weird- please see the pictures below.

    My question is is there any possibility (for the case when I have one campaign multiple DS) to replace reply to address to the DS reply to? (the same way you replace from address )

    upload_2019-3-5_17-5-34.png

    upload_2019-3-5_17-6-56.png
     
  7. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    Same question about FROM NAME :
    is is there any possibility (for the case when I have one campaign with multiple DS) to replace from name to the DS from name? (the same way you replace from address )
     
  8. GregKevey

    GregKevey New Member

    Joined:
    Dec 29, 2018
    Messages:
    21
    Likes Received:
    0
    S.E:
    2019-06-29 11:20:31
    L.T:
    Regular
    L.C:
    1
    Did I explain it well? Is there any chance you will help me?

     
  9. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,037
    Likes Received:
    2,343
    Unfortunately not out of the box but you can do it with a hook.
    Create the file apps/init-custom.php with this content in it:
    PHP:
    <?php

    Yii
    ::app()->hooks->addFilter('console_command_send_campaigns_campaign_custom_headers', function($headers$campaign$subscriber$customer$server$emailParams){
     
        if (empty(
    $server->reply_to)) {
            return 
    $headers;
        }

        foreach (
    $headers as $index => $header) {
            if (
    $header['name'] == 'List-Unsubscribe') {
                unset(
    $headers[$index]);
            }
        }
        
    $headers array_values($headers);

        
    $options Yii::app()->options;

        
    $listUnsubscribeHeaderValue $options->get('system.urls.frontend_absolute_url');
        
    $listUnsubscribeHeaderValue .= 'lists/' $subscriber->list->list_uid '/unsubscribe/' $subscriber->subscriber_uid '/' $campaign->campaign_uid '/unsubscribe-direct?source=email-client-unsubscribe-button';
        
    $listUnsubscribeHeaderValue '<'.$listUnsubscribeHeaderValue.'>';

        
    $_subject sprintf('Campaign-Uid:%s / Subscriber-Uid:%s - Unsubscribe request'$campaign->campaign_uid$subscriber->subscriber_uid);
        
    $_body    'Please unsubscribe me!';
        
    $mailToUnsubscribeHeader    sprintf(', <mailto:%s?subject=%s&body=%s>'$server->reply_to$_subject$_body);
        
    $listUnsubscribeHeaderValue .= $mailToUnsubscribeHeader;

        
    $headers[] = [
            
    'name'  => 'List-Unsubscribe',
            
    'value' => $listUnsubscribeHeaderValue,
        ];

        return 
    $headers;
    });
    And this should do what you are after.
     

Share This Page