Changed send mail method