raising mail errors for test