new email function updates