added mail functionaltiy