Modified email function.