Email functionality

Email functionality working, just need to try it on a online host
because of the mail fuction