Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsubscriber URL never getting called By Gmail #2989

Closed
iamved777 opened this issue Nov 30, 2023 · 1 comment
Closed

Unsubscriber URL never getting called By Gmail #2989

iamved777 opened this issue Nov 30, 2023 · 1 comment

Comments

@iamved777
Copy link

Hi!
I have added custom header like this in my email

$mail->addCustomHeader(
            'List-Unsubscribe',
            "<mailto:[email protected]>,<https://example.com/unsubscribe.php?email=" . $email. ">"
        );
        $mail->addCustomHeader(
            'List-Unsubscribe-Post',
            'List-Unsubscribe=One-Click'
        );

Its link showing in gmail as attached image, I can see complete link in view original message but whenever I click Unsubscribe, its showing unsubscribed but its URL is never getting called and I am not getting any POST or GET request for the same in given URL.

Screenshot_1369
Screenshot_1370

Let me know if I have done anything wrong or missing something.

Thanks!

@Synchro
Copy link
Member

Synchro commented Nov 30, 2023

Those headers look ok. You say "its showing unsubscribed" – what exactly happens when you click the link? If you copy the URL out of the message and open it in a browser, do you get a hit on your script? If you do, then it may be that google is filtering the request; they are prone to doing things like that.

I'm not sure if it's for redaction purposes, but the parameter you're providing is literally email=token, rather than an actual token, though that should not prevent it from hitting your script – you just won't be able to tell who the click applies to.

@Synchro Synchro closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants