The goal of sending some data|string to user email is validation of account owner. Please care about some points:
- Avoid sending important information in reset or activate link.
- It's best way to store unique string data conjunction with user
account and send it as that link. but be aware if you send just one
section as link to user email and just check it in page, your
application may be in dangerous by brute-force or dictionary
attacker. It's enough to check a list of string to find some links
and change password. I know that has a little chance, but not zero.
Result:
I think it's better if you
- combine user email with string link then encrypt them
(not hash because hashed value can't be reverse) and send to user
email.
- User click and your page get the encrypted value.
- decrypt value.
- extract user email.
- find email in database.
- compare string from received link with other one attached to user
email in database.
Good luck.