Implemented business logic of email sending

Implemented business logic of email sending. #93