Mail plugin validation and exception handling