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

Feature idea: Display of List-Unsubscribe Header #236

Closed
kronthto opened this issue Jan 16, 2024 · 4 comments
Closed

Feature idea: Display of List-Unsubscribe Header #236

kronthto opened this issue Jan 16, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@kronthto
Copy link

It could be nice to check for existance of the combinations of these headers:

List-Unsubscribe: <mailto:[email protected]?subject=unsubscribe>,
<https://example.com/unsubscribe.html?opaque=123456789>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

And give feedback whether they are valid (e.g. not missing the < > signs) and render a preview of the Unsubscribe button mailbox providers sometimes show.

@axllent axllent added the enhancement New feature or request label Jan 16, 2024
@axllent
Copy link
Owner

axllent commented Jan 16, 2024

Thanks for the suggestion. I'm not too sure about the validation (ie: just because they are formatted correctly does not mean they work so it would give a false sense of security), but displaying the field if it exists sounds good. I'll need to do some further reading on the one click thing as this seems very specific to just a few clients.

Don't hold your breath though, I'm working on a larger piece of code right now (integration with SpamAssasin to display a general spam score), and am really busy at work, but I'll see what I can do 👍

@axllent
Copy link
Owner

axllent commented Jan 20, 2024

@kronthto The solution I have come up with (to be included in the next release) will display an Unsubscribe "link" next to the "From" line if the List-Unsubscribe header exists. When clicked it will show the parsed (valid) email and/or http unsubscribe inks below the tags (hidden by default). If there are validation errors, these will be displayed as icons which, when clicked or hovered over will display a tooltip with the error. If there are any errors then the Unsubscribe link will also display a red icon to alert you.

If the message also contains a List-Unsubscribe-Post when another icon is displayed with the tooltop of the header value.

Unsubscribe

Is this what you were after?

axllent added a commit that referenced this issue Jan 20, 2024
@axllent
Copy link
Owner

axllent commented Jan 21, 2024

This new feature has just been released in v1.13.0. I also added syntax validation with a number of checks for valid and invalid List-Unsubscribe syntax (based on the information I studied).

Please feel free to re-open this ticket if this does not work as you expected?

@axllent axllent closed this as completed Jan 21, 2024
@kronthto
Copy link
Author

Wow this is awesome, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants