mail function
reset password function improvement