How to add one-click unsubscribe functionality to email newletters?

前端 未结 7 1746
长发绾君心
长发绾君心 2020-12-13 05:24

I\'d like to customize the \"unsubscribe\" links in our email newsletters so that they remove the recipient with a single click. Right now they just point to a generic page

相关标签:
7条回答
  • 2020-12-13 06:02

    I have used a somehow simple method in a web application but I'm not sure if it is efficient and secure enough for other web app's purposes .

    In my app when the user click on the unsubscribe link, I forward them to a page on my server with a Query string which is a combination of user email address and it's unique id in my DB (both encrypted preferably).

    Then in the page load function of my page, first I decrypt the Email address, and then I check to see if the email address exist in my DB and then if the answer is TRUE, I check if the ID and the Email address are related and finally I remove the user according to other criterion.

    I think it would do the job without any extra data entry to the DB.

    Now I'm looking for a way to find out if the person who has clicked the link is the first hand person who I have send the email to or the email has been forwarded to him/her. So that no one other than the real user can (at least easily) unsubscribe him/her!

    [Asking for a security question before finalizing the unsubscribing process is one thing that I have thought about so far]

    0 讨论(0)
提交回复
热议问题