added mail code in iniitalize