Add mail-on-failure support.