added send mail and fixed attributes