email function in helper