List Unsubscribe Header
Would it be possible to add a list unsubscribe header to emails sent from Sendy? I understand that this is a reputable thing for bulk marketing senders to use?
This discussion has been closed.
Would it be possible to add a list unsubscribe header to emails sent from Sendy? I understand that this is a reputable thing for bulk marketing senders to use?
Comments
(+1) This is important, specially for hotmail and gmail
http://www.list-unsubscribe.com/
https://support.google.com/mail/answer/81126
It's really simple to set it up:
# extract unsubscribe url
$unsub_url = get_app_info('path').'/unsubscribe/'.short($email).'/'.short($subscriber_list).'/'.short($campaign_id);
# add header
$mail->AddCustomHeader("List-Unsubscribe: <mailto:".$from_email."?subject=Unsubscribe>, <".$unsub_url.">");
After implementing, Hotmail will show the link to unsubscribe on its interface under the button Sweep. On Gmail the user has to click on the little arrow bellow the sender address and there will be a link to unsubscribe.
I hope this helps.
Regards
Alexandre
What file needs to be edited?
includes/create/send-now.php
Hi @angelim,
Thanks for your suggestion and the code. I realize Gmail does not 'click' the link included in the
List-Unsubscribe
header, it only sends an email in which you have to manually unsubscribe the user in Sendy. Hotmail does not even send an email or 'click' the unsubscribe link in theList-Unsubscribe
link at all.Can you let me know what's the behaviour like on your side for both Gmail and Hotmail?
Thanks.
Ben
@angelim: Thanks for the suggestion, but even a hard-coded version isn't working for us. Maybe it's not being picked up properly by PHPMailer?
We've added this immediately before the $mail->Send(); line:
But it doesn't show up in the headers of the received mail. What am I missing? @angelim or @Ben - any ideas?
@SteveJ
May i know which script did you add this in?
If you're using a cron job to send emails, t should be
scheduled.php
. If you're not using cron, it should be/includes/create/send-now.php
.Ben
Ah! That probably is the key. We are using cron!
Ok - we're closer! Here's what I'm now including in scheduled.php:
Which ALMOST works -- it's showing up in the email header as:
Custom field #2 is named "MD5" but it's spitting out "MD5:Text" instead of the actual value of the field for the user.
Any ideas on how to spit out the actual value?
Figured it out: custom_values_array instead of custom_fields_array
Hi @Ben and @SteveJ,
Sorry for the delay. I don't know how to receive notifications for the threads I'm in.
I've just tested out the unsubscribe buttons in both Gmail and Hotmail. Before now, I had just checked the options made available in their interface when adding the unsub header.
Gmail ignored the unsub URL and only used the unsub email address(even when listing the url before the email in the header). It seems that some people were able to get it working with the link, though: http://bronto.com/blog/deliverability/gmail-unsubscribe-options
When I click "Report Spam", Gmail also gives me an option to unsubscribe from the list:
Unsubscribe and report spam
. That also triggered the unsub email, which could be used as a feedback loop.As far as I'm aware, gmail doesn't support a standard feedback loop(Amazon can't pick it up), so this is a plus.
https://forums.aws.amazon.com/message.jspa?messageID=429442#429665
My Hotmail interface is not in english so I'll try to translate it without actually confirming the right wording.
Clicking on Sweep/Usubscribe will trigger a modal entitled: "Stop receiving this newsletter".
Go to YOURWEBSITE website(linked to unsub url) to unsubscribe. If this sender sends another email in the meanwhile, we'll place it in the trash.
Clicking the word "website" linked me to the unsubscribe url.
I hope it helps.
+1 to this feature, is another step to increase deliverabilty
+1 This will be a great feature indeed. Thanks
+1 from me too.
Anything that aids deliverability by pleasing the big players in the email world gets my vote. I work a lot with small business owners. A single subscriber can bring in a lot of money (relatively speaking) for a small company. I am very impressed by Sendy. Many of my clients dream of being able to save the sorts of money that Sendy could save them. The addition of features such as that suggested above would make me more and more inclined to recommend it to them.
+1 I would love to have this feature without having to modify php files, because everytime i've to update sendy i've to reedit some php files
Hello Ben,
I tried to include Angelim suggestion
$unsub_url = get_app_info('path').'/unsubscribe/'.short($email).'/'.short($subscriber_list).'/'.short($campaign_id);
$mail->AddCustomHeader("List-Unsubscribe: <mailto:".$from_email."?subject=Unsubscribe>, <".$unsub_url.">");
in send-now.php but when I hit the send button sendy show sending... tag forever. If i hardcode it
$mail->AddCustomHeader("List-Unsubscribe: unsub+12345@example.com, http://example.com/unsubscribe/>");
everything works so I'm assuming is something when extracting the $unsub_url .
Can you please help?
Thanks
the get_app_info() function is not available in scheduled.php - so you need to hard code the first part of the unsub URL/
WIll be something like - 'http://yourdomain/[path-to-your-sendy]/unsubscribe'
Sorry, bit of a Noob here and configured Sendy today but already a big fan.
Where should the code (mentioned by angelim) be placed in the file "includes/create/send-now.php"?
Thanks
BJ
I expected List-Unsubscribe-Header in 1.1.9.4 as Sendy's releasenotes states: Added 'List-Unsubscribe' header (unsubscribe URL as value) to emails sent as 'campaigns' and 'autoresponders'. I sent a test to Gmail but couldn't find it. Am I looking in the wrong place?
Gmail decides whether to include 'unsubscribe' at the top. They have an algorithm to detect if an email looks like a newsletter, if it does then it will place the unsubscribe link at the top.
Hi!
It seems that in v2.0.1 "List-Unsubscribe" header is automatically added only in the sceduled (scheduled.php) case, but it is not added when you do not use cron (includes/create/send-now.php).
It looks strange because [I guess] no one expects that there is any difference between instant and scheduled sending except time. Moreover, "List-Unsubscribe" is something useful, why not to add it to "instant" sending (includes/create/send-now.php) too?
@Alexey, thanks for bringing this up. I'll apply the same to the 'non cron job' sending script. Thanks.