I'm currently using PHPMailer to send out an email to a mailing list, however I am looking to create an unsubscribe function because I cannot in good conscience not give the option.
The only problem I'm facing is doing it in a safe manner. What I've had in mind so far was to add an href back to my website that would link to a page like http://example.com/unsubscribe.php?email=useremail@test.com but with this method anyone can delete any email they want, or delete the entire mailing list. I'm not sure how I can bypass this issue. My MySQL database only contains a unique email ID which is just their position in the database (the first email added has an ID of 1 and the second has an ID of 2 and so on) and column for the email address itself.