openwisp-notifications
openwisp-notifications copied to clipboard
[feature] Add link to manage notification preferences to email notifications
Depends on https://github.com/openwisp/openwisp-notifications/issues/110.
-
We are currently missing the classic link in the footer of emails which allow users to easily access the email notification preferences. We must add a link in the email footer to the page which will be implemented in https://github.com/openwisp/openwisp-notifications/issues/110.
-
We also want to add a way for the user to opt out of all the notifications without having to log in. There's also an email format which allows email clients to add an unsubscribe button, like the following screen shot:
Security Implications: the link shall work without the need of logging in, but it shall only be able to perform this action and nothing else.
In the footer we can have 2 links, one to manage notification preferences, one to turn off all emails. In order to get the "unsubscribe" button to work we need to look into the "List-Unsuscribe-Header".
In our weekly meeting, we discussed the following implementation details:
-
URL present in the footer of email
- Takes user to a landing page which informs the user that all email notifications can be turned off by clicking a button.
- Clicking on the button will make a POST request to the unsubscribe URL (user a form). Inform the user after successful operation.
- The landing page should have a URL to take user to the notifications setting page.
- Turn off the global notifications for the user
-
URL present in the email header
- Use the same URL as above
- Set the following headers in the email
"List-Unsubscribe-Post": "List-Unsubscribe=One-Click" "List-Unsubscribe": <URL>
@Dhanus3133 we will also have to handle the case where the token is malformed/expired. We need to clearly convey that to the user.