Hi,
I'm creating a newsletter feature for my website and as for now mails can be send
So I simply have a database with id and email and each time a news has been posted a method is being called and mails the post to each iterated email address.
Now, how would you create an unsubscribe feature? You can't possibly create a link like http://www.example.com/newsletter/delete/email
as for security reasons.... So what would you do?
Most use some kind of hash in the link that indicates the user and/or email account.
For extra security (if you have named users) you can ask for a password before unsubscribing. If not, you can send an email to the address of the unsubscriber, saying "sorry to see you go. if this was in error, click here to subscribe again...".