Added sending mail functionality