Fix failing tests due to email handler being enabled