Updated emailing to work in production