send mail & logout