refactor mail_attendees() in mail_controller