in reply to
Newbie: Parsing Email
As noted, you'll need to cut your problem down. You've begun to do so, but its still quite vague. In particular it's not clear what the random/unique password is for, and its not at all clear how you'll tell how many times a user has visited the site. Are they logging in with that generated password? Its not really possible to count visits unless they are.
Finally, try and think about the application requirements distinctly from the technical requirements. (But do post what technical solutions you've started on, or the monks will think you are slacking.;) )