First part of code for sending team invites