Token generation and Send mail functionality.