Email window code added