Added email functionality, not working yet