22
votes

I am unable to get Team alerts for TFS 2012 to work. My question is basically the same as this one (TFS 2012 Team Alerts do not work). But since i am able to elaborate a bit in my question i decided to ask it again.

  • Personal alerts DO work, so it is not an obvious smtp server error
  • Team alerts DO NOT work
  • Our TFS is not connectd to an active directory
  • All users have specified "Preferred email" in their preferences
  • Users are assigned to teams as specified by my alerts

This is an example of a personal alert that works fine

Example of personal alert that works

And here is an example of a team alert that does not work

Example of team alert that does not work

The setup is basically the same except for the "wildcard" parameters in the filters

Where does TFS pick [Members' Default Alert Address]? Is that not the same as Preferred email?

Any pointers would be appreciated

Addendum

Looking at the Tfs cammand prompt tool (tfsconfig configuremail) and Administration Console raises further questions

Team Foundation Server Administration Console shows enabled alerts and correct settings

Team Foundation Server Administration Console, Email Alert Settings

But the command prompt tool, tfsconfig configuremail says the alerts are disabled

tfsconfig configuremail

I have found no way to acivate alerts with the command prompt tool (http://msdn.microsoft.com/en-us/library/vstudio/dd236903.aspx), only the checkbox in Administration Console

Main clues as of now:

  1. Where do TFS pick [Members' Default Alert Address]?
  2. How come there is a mismatch of enabled/disabled alerts?
8
Did you setup the email settings on your server? Like this: msdn.microsoft.com/en-us/library/ms400808(v=vs.110).aspxMorten Frederiksen
Yes, but i found something curious in the command prompt tool. I updated my question.Urban Björkman
Have you checked the job history? Almost sounds like the bug mentioned in this post made it in to the RTM. social.msdn.microsoft.com/Forums/en-US/TFSvnext/thread/…RobinK-Teleopti
Did you check my answer in the similar question that you refer to?Mohamed.Radwan -MVP
Are there any errors in the event log?MrHinsh - Martin Hinshelwood

8 Answers

6
votes

After following all of the instructions here (and finding that weird undocumented enabled/disabled configuration as well), I still had the same problem.

I then read this question - it seems that the answer is the same: without Active Directory, TFS will not send team alerts. Users can set their preferred email address, which TFS will then sync to Active Directory as the "[Member's default email address]". If no Active Directory is found, that sync won't work, which means their default email is blank. Blank email means no alert sent (which means no error about the sending failing either).

So, unless someone writes a plugin (or the TFS team changes how it works under the hood), you need Active Directory for team alerts to work.

14
votes

I have decided to answer this one myself, mainly because it might not be a proper solution for a tfs without an active directory (based on answer/comments in this post)

These are the steps i have taken to make sure that team alerts are sent

  1. Make sure your setup is correct http://msdn.microsoft.com/en-us/library/ms400808(v=vs.110).aspx
  2. Make sure that you have the Team Project filter in your team alert
  3. Enable team alerts in Team Foundation Server Administration Console Team Foundation Server Administration Console
  4. Enable team alerts with tfsconfig command prompt tool (this is an undocumented feature) tfsconfig configuremail /Enabled:True
  5. Check Event Viewer logs Tfs Event Viewer log
  6. make sure all names are straightforward without any apostrophe or special characters, try to have only one member and test and start increasing the number of members each time with test till you get your problem. (Thanks to M. Radwan from this answer)
  7. Diagnosing Email and SOAP subscription failures using this guide http://blogs.msdn.com/b/granth/archive/2009/10/28/tfs2010-diagnosing-email-and-soap-subscription-failures.aspx
  8. Make sure your users in your ad have correct emails
2
votes

Posting this as an additional step of verification if the aforementioned does not help. I'm working with TFS 2012. I initially step through the steps outlined above and got email notifications working, however after sometime it simply stopped.

After repeating the steps above and having no success I referred to the event viewer Applications and Service Logs --> Microsoft-Team Foundation Server --> Debug as Urban mentions. I found thousands of errors relating to the TFSJobAgent. I opted to restart the service: "Visual Studio Team Foundation Background Job Agent" via the Services.msc via Administrative Tools, and all pending email alerts were immediately received.

I initially searched the services list looking for something starting with TFS after coming across this Microsoft documentation: http://msdn.microsoft.com/en-us/library/ms253108.aspx I found related service.

0
votes

To send email notifications, you must configure the following in your deployment, pleae make sure Your firewall must be configured to allow communications between Team Foundation Server and your SMTP server.

The service account for Team Foundation Server (referred to by the placeholder TFSService) must either be a domain account with permission to send email, your SMTP server must be configured to allow anonymous senders to send email, or you must have previously created an account specifically to use as the email account for alerts.

If you used a system account (such as Network Service) as the service account for Team Foundation Server, you must either configure your SMTP server to allow anonymous senders to send email, or you must make sure that you configure the integrated authentication settings appropriately for your deployment. If you do not, email notifications will not be sent.

For more information, please refer to http://msdn.microsoft.com/en-us/library/ms400808.aspx

0
votes

you added alerts in Alert Explorer without specifying any Team Project. Once I added the Team Project filter it started working.

0
votes

I had the same issue. Your internal smtp server (only sends internal e-mails) does not require authentication.

I set as username: anonymous Password: 123

I was suprised that it worked ;-).

0
votes

I fixed the issue by sending every member a test alert email from TFS Admin/ Alert Notification screen. My understanding is that through this method it populates these email addresses and knows where to send. Apparently MS testers missed this b/c their group's emails where already cashed somewhere. In my case I have a small startup group, but I can imagine for enterprise group it can be quite a work.

0
votes

Just host SMTP on the local machine (TFS machine) and put the IP of local machine in Relay section along with 127.0.0.1.

I was struggling for the error for hours and finally it fixed up my issue...