putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
64 stars 24 forks source link

`List-Unsubscribe` in email header #480

Closed scandella closed 3 months ago

scandella commented 3 months ago

Support Request

Hi, I've some questions about the new "One-click Unsubscribe Option" compliance within the campaign plugin.

Using Campaign 1.26.0 with Craft 3, I can see the List-Unsubscribe-Post and the List-Unsubscribe link in the mail header, but the link does not unsubscribe the recipient mail. For instance, https://www.editionsdalva.fr/actions/campaign/t/one-click-unsubscribe?cid=c61180fb3d3dd7oci&sid=s6666aa54a2f6dsrr returns 200, but the contact remains subscribed.

Using Campaign 2.15.3 with Craft 4, I can not find any List-Unsubscribe-Post and the List-Unsubscribe link in the mail header.

Thanks for your help.

Plugin Version

No response

bencroker commented 3 months ago

Using Campaign 1.26.0 with Craft 3, I can see the List-Unsubscribe-Post and the List-Unsubscribe link in the mail header, but the link does not unsubscribe the recipient mail.

The campaign/t/one-click-unsubscribe endpoint only unsubscribes contacts via POST requests, so visiting the URL alone will not result in an unsubscribe. This is so that when anti-spam software built into email clients visits the URL using a GET request, the recipient won’t get unsubscribed

Using Campaign 2.15.3 with Craft 4, I can not find any List-Unsubscribe-Post and the List-Unsubscribe link in the mail header.

Are you using AWS SES by any chance? If so, please ensure that the option to ​“Include original headers” is enabled, as per the docs at https://putyourlightson.com/plugins/campaign#bounce-and-complaint-handling

scandella commented 3 months ago

Using Campaign 2.15.3 with Craft 4, I can not find any List-Unsubscribe-Post and the List-Unsubscribe link in the mail header.

When I send the mail with SMTP settings, I can see the List-Unsubscribe-Post mention and the List-Unsubscribe link in the mail header. But when I use AWS, they are not in the header.

Are you using AWS SES by any chance? If so, please ensure that the option to ​“Include original headers” is enabled

I've checked and rechecked, and the “Include original headers” is enabled.

CleanShot 2024-06-11 at 23 09 45@2x

bencroker commented 3 months ago

So it turned out that the Amazon SES plugin was not able to send custom email headers. I’ve added this ability in Amazon SES 2.1.0 and 3.1.0. Please update and let me know if that resolves the issue for you.

scandella commented 3 months ago

Thanks Ben, it works know.