I have a created a custom module with simple form with only three fields (URL, title, and email), where user must enter all the fields for submission.
I am able to send the mail to the user from my custom module, but I need to create and attach a validation link (possibly with unique token for email).
How do I generate a token and store it in the database to use it for validation?