1

sometimes we have unsubscribed users in our mailing reports, but there was no unsubscribe-link in the mail (no newsletter!). How did the user manage to unsubscribe?

We use Mosaico templates and CiviMail. The environment is a CiviCRM 5.78.2 with WordPress 6.6.2

Thanks, Regina

1 Answer 1

2

They are most likely using one-click unsubscribe. In early 2024, Google and Yahoo mandated that bulk emails support them, so CiviCRM added them. So there's an "unsubscribe" link at the top of these emails in GMail.

I wrote an extension to remove them if you disable the requirement for an unsubscribe link. I haven't published it, but I could if that's helpful. But for the techies, the code itself is right here:

function nounsubheader_civicrm_alterMailParams(&$params, $context) {
  // Don't add "List-Unsubscribe" header if the mailing doesn't have an unsubscribe token.
  if (Civi::settings()->get('disable_mandatory_tokens_check')) {
    unset($params['List-Unsubscribe']);
  }
}

UPDATE: It seems there's an easier option now - Administer » CiviMail » Mailer Settings, looks like you can remove HTTP(S) One-Click from the Unsubscribe Methods.

1
  • Thank you, Jon. We don't want to remove the ability to unsubscribe, but want to understand the process behind it. Anyway, we have mostly users beyond Gmail and Yahoo who obviously see this one-click-thing, too. Commented Nov 5 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.