Mail functionality updated