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
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]