added email function

email function added , need to change to true false rather than console