sofn-xyz / mailing

Build, test, send emails with React
https://www.mailing.run
MIT License
3.61k stars 72 forks source link

Projects using mailing should be able to link to preferences page easily #442

Open alexfarrill opened 1 year ago

alexfarrill commented 1 year ago

A project using mailing may want to link to the unsub page from somewhere outside of an email, e.g. from a web page for a user's preferences. Two ideas for how we could do this:

1) make a mailing api route that we can POST to with an email address, list name (validated by api key header) and we get back a subscriber id or link to the preferences page for that subscribe/list.

2) make it possible for iterate to generate links that will redirect correctly to a preferences page on mailing. similar to the above, but it would be a GET with the email, list in the url and a hash of the api key with the email and list. mailing then validates that the key matches a hash of one of the same with a valid api keys and if it does it responds with a 3xx