send mail confirmation logic added