Some more email invitation refactoring