Added mail_handler logging, moved some mail_handler methods to plugin, fix empty body with email without multipart