Generate token and send email on click