app icon indicating copy to clipboard operation
app copied to clipboard

Make the One-click unsubscribe work in gmail

Open Neilpang opened this issue 3 years ago • 8 comments

It seems that gmail supports rfc 8058:

https://www.sparkpost.com/blog/list-unsubscribe-give-subscribers-freedom-leave/

But I can not see the unsubscribe button in gmail.

Is there something wrong?

Neilpang avatar Feb 10 '22 04:02 Neilpang

@Neilpang Gmail only show the unsubscribe button on a high-volume sender and as SimpleLogin has a lot a senders (i.e. reverse aliases), SimpleLogin doesn't have a single high-volume sender address. We don't know why Gmail makes this decision.

nguyenkims avatar Feb 10 '22 10:02 nguyenkims

As I installed your simplelogin extension in my Chrome browser, Is it possible to Add an unsubscribe button by the extension?

Neilpang avatar Feb 10 '22 12:02 Neilpang

@Neilpang It is probably technically possible but I think to do it properly would require hooking into Gmail's API to get the headers for the specific email you're viewing, which then would add an unsubscribe button to the extension. Overall it is quite a bit of work and would probably require each user to register a Gmail API key (edit: or maybe not, there is a very reasonable quota limit on Gmail API usage) and the extension permission to read data on Gmail. I think it would be more worth it trying to reach out to Gmail to see if this is really an intended feature or just a bug.

FozzieHi avatar Feb 10 '22 12:02 FozzieHi

@FozzieHi

I don't think Gmail's API is necessary.

There are a lot of "Unsubscribe Button" extensions in the Chrome app store.

At least, there is a "Show original" button in the gmail page to show the original eml message.

As a chrome extension, we can get thie eml message without extra permissions.

Neilpang avatar Feb 10 '22 12:02 Neilpang

To do it properly would be to leverage Gmail's API as even a minor change to the webapp could result in breakage. Even so getting it through the webapp would still need the user to grant the extension with permissions to read data on Gmail's website if they haven't already granted permission to read global data due to the in-website generator functionality.

FozzieHi avatar Feb 10 '22 12:02 FozzieHi

There are a lot of "Unsubscribe Button" extensions in the Chrome app store. I tried manu of them, they don't require any extra permissions, they can read my gmail content and find the unsubscribe link automatically.

Neilpang avatar Feb 10 '22 13:02 Neilpang

It seems that the simplelogin extension already required the permissions for all the websites: https://github.com/simple-login/browser-extension/blob/master/src/background/permissions.js#L35

Neilpang avatar Feb 10 '22 13:02 Neilpang

Yes, the current extension requests permission for all origins if the user enables the option for the SimpleLogin button on web pages (see simple-login/browser-extension#88): image

I don't see how any other extension can read your Gmail messages without specifically requesting permission for at least the Gmail origin.

FozzieHi avatar Feb 10 '22 13:02 FozzieHi