added mail fucntionality