added functions for sending email after user's registration