Added email code but not working, need to fix