added basic email function