Sending email instead of console write