Implemented email sending stuff.