send mail in thread