some headers flagging mails to google promotions (bulk mail) tab

Vroom

Member
I did some tests and this is what I am seeing.

I have a list with only my own email address on it (so it sends out only a single message). Any message I make in the template, even something as simple as "This is a test", this is the results I get.

When I send the message using the test the template button, it gets to my inbox fine. When I then send the campaign (which only goes to myself), even the simplest email like mentioned above goes to my promotions tab, even though the identical test email went to inbox.

When comparing the original of the two emails I see the only difference is the added headers which are included when sending it as a campaign. The extra headers are as follows (did a file compare):

Code:
X-Report-Abuse: Please report abuse for this campaign here:
 http://www.XYZ.com/lists/index.php/campaigns/es124ccv8zd32/report-abuse/nw422ve1mnca1/mn943jg8rbc9c
X-Mw-Campaign-Uid: es124ccv8zd32
List-Unsubscribe: <http://www.XYZ.com/newsletter/index.php/lists/nw422ve1mnca1/unsubscribe/mn943jg8rbc9c/es124ccv8zd32>,  <mailto:info@XYZ.com?subject=Unsubscribe&body=Please unsubscribe me
 from Test List list.>
List-Id: Test List <nw422ve1mnca1>
X-Mw-Customer-Uid: vv5735zcjm461
X-Mw-Subscriber-Uid: mn943jg8rbc9c
X-Mw-Mailer: SwiftMailer
X-Mw-Customer-Gid: 0

In addition to those, there is one header which has this extra:

Code:
h=List-Id:List-Unsubscribe:

So something within this is flagging all mails as promotional material and being put in the promotions tab (about half as bad as getting in the spam folder).

It would be good if there were a way we could modify the headers by choosing what to include and what to leave out so we can play around to see what gets through to the inbox and what gets routed to the promotions tab.

Is there a particular file that deals with building the header that we can edit?

P.S. My past experience is with phplist, and whatever headers they use get through to the google inbox fine (provided your test mail made it to inbox, then the campaign also gets to the inbox). I always test this on multiple email accounts with each campaign and track where the emails get delivered to.
 
Last edited:
Just did the same test on mail-tester. Both got 10/10.

Over the last year I have done thousands of these tests with gmail, doing them with every single mailout I do (which is every day) to first get them past googles promotion tab, sending tests to dozens of email accounts in various manners and adjusting campaigns till they get through cleanly. In this case it really is the headers that are triggering it, at least it pushes it across the line in my case.

The simplest way to confirm this, which I will try, is if I remove the headers and send the campaign and then compare the results. But it will take some time to go through the files and find which is building the headers.
 
There are just two files where you have to look at:
/apps/common/components/mailer/MailerSwiftMailer.php#L225
and
/apps/console/components/behaviors/CampaignSenderBehavior.php#L320

If you find something pertinent, let me know.
Thanks.
 
I deleted the following lines and now the email gets delivered to the inbox instead of promotions tab in gmail:

Code:
                    'X-Mw-Campaign-Uid'     => $campaign->campaign_uid,
                    'X-Mw-Subscriber-Uid'   => $subscriber->subscriber_uid,
                    'X-Mw-Customer-Uid'     => $customer->customer_uid,
                    'X-Mw-Customer-Gid'     => (string)intval($customer->group_id), // because of sendgrid
                    'List-Unsubscribe'      => $listUnsubscribeHeaderValue,
                    'List-Id'               => $list->display_name. ' <' . $list->list_uid . '>',
                    'X-Report-Abuse'        => 'Please report abuse for this campaign here: ' . $reportAbuseUrl,

Not fair of google to punish us for being open and helpful. My server already appends an abuse header so for me its enough. No good deed goes unpunished.

As expected the little "unsubscribe" button that google automatically adds next to your email is also gone. Not sure if that was useful or not.
 
So you have to delete all those headers ?
Did you try removing all those and then add one by one to see when it starts failing?
You could also try to mangle X-Mw- prefix into something else, say X-Vr- just to see if it makes any diff :-?
 
I was lazy and just deleted the whole lot at once. When I get time I will add them one by one and try to pinpoint which is the cause.
 
In case anyone else does this, you need to keep the following for bounce processing, otherwise bounce processing doesnt work:

'X-Mw-Campaign-Uid' => $campaign->campaign_uid,
'X-Mw-Subscriber-Uid' => $subscriber->subscriber_uid,
 
Amazing Solution
Thanksss Vroom and Admin...
Campaigns now Gmail INBOX :)
But Hotmail having still same Junk Folder... Any Solution for Hotmail ?
 
Which file contains the list-unsubscribe header? It used to be in /apps/console/components/behaviors/CampaignSenderBehavior.php but I can't find it there any more.

I wanted to test how gmail places emails with that header and without in relation to inbox and promotions tab.

Edit: Actually I see it is there in the original file (I had edited mine), but when I delete the line:

'List-Unsubscribe' => $listUnsubscribeHeaderValue,

It still adds the header.

Can it be taking it from somewhere else as well?
 
Last edited:
Found it was also in:

/apps/console/commands/SendCampaignsCommand.php

Now it is sending without that header.
 
I deleted the following lines and now the email gets delivered to the inbox instead of promotions tab in gmail:

Code:
                    'X-Mw-Campaign-Uid'     => $campaign->campaign_uid,
                    'X-Mw-Subscriber-Uid'   => $subscriber->subscriber_uid,
                    'X-Mw-Customer-Uid'     => $customer->customer_uid,
                    'X-Mw-Customer-Gid'     => (string)intval($customer->group_id), // because of sendgrid
                    'List-Unsubscribe'      => $listUnsubscribeHeaderValue,
                    'List-Id'               => $list->display_name. ' <' . $list->list_uid . '>',
                    'X-Report-Abuse'        => 'Please report abuse for this campaign here: ' . $reportAbuseUrl,

Not fair of google to punish us for being open and helpful. My server already appends an abuse header so for me its enough. No good deed goes unpunished.

As expected the little "unsubscribe" button that google automatically adds next to your email is also gone. Not sure if that was useful or not.
Where i can can delete these line ?
 
I also wanted to delete telltale mass-mail headers and am able to make my emails very clean with the following changes (Mailwizz version 1.3.6.5):

Remove mention of a mailer:
Comment lines 339 - 341
/apps/common/components/mailer/MailerSwiftMailer.php

Remove Gid, Sid, List-Id, Report-Abuse, Unsubscribe etc
Comment lines 675 - 684
apps/console/commands/SendCampaignsCommand.php
Comment lines 331 - 340
apps/console/components/behaviors/CampaignSenderBehavior.php

Remove Reply-To (I send directly from a reply-to address)
Comment lines 269 - 271
apps/common/vendors/SwiftMailer/lib/classes/Swift/Mime/SimpleMessage.php
Comment lines 267 - 269
apps/common/vendors/SwiftMailer-5x/lib/classes/Swift/Mime/SimpleMessage.php

I found that Amazon SES does not need those campaign and customer headers in order to do bounce processing. I get the correct behavior for bounced messages, out-of-office responses, spam complaint and SES suppression lists.
 
@Joe Nelson @twisted1919
If i delete only those lines mentioned in your comment, will it be helpful to deliver directly into INBOX of Hotmail/Live/Outlook ?
because i have fresh installed latest version , and i found that emails directly hit Inbox for Gmail, but on microsoft email platform it deliver into junk, even a simple text mail.
please help me with this to solve problem.
Thank You
 
@Mps I don't know whether it will solve your Hotmail deliverability. Going to the junk folder seems pretty bad, worse than going to "Promotions" in Gmail. The header changes I described are designed to help the messages stay out of the Promotions tab in Gmail, but it seems like your problem is more fundamental. What server are you using to send the emails? Perhaps its reputation isn't well known which causes some systems to treat the messages as spam.
 
@Joe Nelson
I using LiquidWeb VPS platform to send emails,with Gmail everything is going smooth,
only problem with Hotmail,
I can establish another email platform for Hotmail if you help me to tell which hosting server is good for Hotmail-Inbox,
my only problem is Hotmail Right now..
please help me with this..

Thank You
 
I would say, first remove only "List-Unsubscribe" and "List-ID" headers. That **should** solve the promotional box woes in GMAIL. If that solves, you will not have to unnecessarily delete others.

@Mps Improving deliverability at Microsoft controlled domains is a difficult task. That said, if you're a legitimate sender, you will gradually hit INBOX within a few weeks of constant volume sending. Limit your daily volume to < 100 emails per day during the initial days, and gradually go up as you observe some improvement. To be a 'legitimate' sender at Hotmail/outlook etc, you should have properly configured Sender ID (SPF) and DKIM. DMARC will further enhance the chances of inbox hit. Additionally, you should sign up for their JMRP (Junk Mail Reporting Program) - that's what they call their feed back loop system. Once you sign up, they will show you the problematic emails you sent through the registered IP(s) on their dashboard with the reputation info. You Should have working postmaster/abuse mailboxes and that should be added to MW for FBL processing. JMRP will take up to 48 hours to get approved and you should be monitoring all the mailboxes you specified on the JMRP form - they will send verification emails and you should sign an agreement digitally. That's pretty much all about Hotmail and other MS domains. Be legit and you will hit inbox for sure !

EDIT : Your mail server IP should have a properly set rDNS as well.
 
Last edited:
I hope that none of those suggestions will filter through into a release of MailWizz. Newsletters are bulk-mail and in my opinion any responsible email marketer should comply to all aspects of CAN-SPAM. While removing List-Unsubscribe and other headers to "mask" that the mails are not bulk, you are just deferring the issue as mail providers will eventually pick up on this and possibly reduce your sender reputation or worse mark the sender-application MailWizz as non-compliant.

I personally find the placement of newsletters/campaigns in the promotional tab more applicable as it improves workflow and with those mentioned hacks you stand the risk of moving from Inbox straight into Junk.

As a responsible sender you should really have the following in place:
BTW: Removing those headers will not move you out of Junk. There is a stronger chance that your mail reputation improves if you follow the above.
 
Back
Top