如何在TFS 2017中向非团队成员发送个性化邮件通知?
Hey there, I’ve run into this exact issue with TFS 2017 when trying to keep customers updated on requirement changes—let me walk you through the practical steps to get this working:
1. Add the Customer as an External User First
TFS 2017 restricts email notifications to users recognized in its identity system by default, which is why you got that "not a valid member" error. You don’t need to add them to any team, just register their email as an external user:
- Open the TFS 2017 web portal, click the gear icon in the top right to access Project Collection Settings.
- Navigate to Security > Users > Add.
- Enter the customer’s email address, set their access level to Stakeholder (this is the lowest, free tier that only grants read-only access to track work items).
- Save the user—now TFS will recognize their email as a valid recipient.
2. Create a Targeted Alert Rule for Requirement Changes
Once the external user is added, you can build a custom alert to notify them only when their specific requirements change:
- Go to the Work hub, either locate the exact requirement(s) the customer cares about or create a query that filters their requests (e.g., by work item type "Requirement" and customer-specific tags).
- Click the bell icon (Alerts) > New Alert Rule.
- Under Alert Me When, select Work item is changed as the trigger.
- Refine the filters to narrow down to only their requirements—add conditions like "Work Item ID equals [their request ID]" or "Title contains [their project name]".
- Under Send To, start typing the customer’s email—TFS will auto-populate it now that they’re a registered user.
- Customize the email content: edit the subject line to include their request title, and adjust the body to show key changes (like status updates or comment additions) plus a direct link to the work item.
3. Advanced: Use Build/Release Pipelines for Hyper-Personalized Emails
If you need full control over email content (like adding custom customer messages or dynamic data), leverage TFS’s pipeline tools:
- Create a build or release definition that triggers when a relevant requirement work item is updated.
- Add the Send Email task from TFS’s task library to your pipeline.
- Configure the task to send directly to the customer’s email—since they’re registered as an external user, the task will accept the address without issues.
- Use TFS API calls within the pipeline to pull work item details (like change history or assignee notes) and inject them into the email for a tailored message.
Quick Tips
- Stakeholder access doesn’t consume TFS licenses, so this is a cost-effective way to add external users.
- Double-check your TFS server’s SMTP settings in Administration Console > Application Tier > Alert Settings to ensure emails can be sent successfully.
- If multiple customers need updates, create an organizational distribution list, add it as an external user in TFS, and send notifications to the list instead of individual emails.
内容的提问来源于stack exchange,提问作者Juan Pablo Gomez

