Refactoring. Create method to send email.