Maybe we should take a step back and try to understand what you are doing? You want to send out emails to some list of people? And include in that email a link which brings them back to your web site where they, and only they, can register for something?
If you are trying to learn how to program, seems OK. But if you just want to get on with your needs, have you considered Eventbrite or some other service?