Refactor mailers and email processing

Line is too long. [82/80]