(CDB) Fix leader sending mails when changed to leader