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

GregKevey

New Member
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:
P.s. In Customer Group settings > Campaigns > "List unsubscribe header email" - I was not able to add [DS_FROM_EMAIL] placeholder ..
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.
 
Just remember that we set the reply-to address and then if the above is set, we set that.
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?
 
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?
 
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
 
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 )
 
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 )
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.
 
Its still showing

<https://app.alerts.11xi.in/lists/qv...944e24?source=email-client-unsubscribe-button>, <mailto:info@alerts.11xi.in?subject=Campaign-Uid:pk811hv944e24 / Subscriber-Uid:ab013wwlx4dfc - Unsubscribe request&body=Please unsubscribe me!>

But i need

This part first
<mailto:info@alerts.11xi.in?subject=Campaign-Uid:pk811hv944e24 / Subscriber-Uid:ab013wwlx4dfc - Unsubscribe request&body=Please unsubscribe me!>,

and after that
<https://app.alerts.11xi.in/lists/qv...944e24?source=email-client-unsubscribe-button>

So the result i want is:

<mailto:info@alerts.11xi.in?subject=Campaign-Uid:pk811hv944e24 / Subscriber-Uid:ab013wwlx4dfc - Unsubscribe request&body=Please unsubscribe me!>, <https://app.alerts.11xi.in/lists/qv...944e24?source=email-client-unsubscribe-button>


But it showing unsubscribe link first then mail to but i want mail to first then unsub link
 
So the result i want is:
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);

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

    return $headers;
});
 
Back
Top