Cannot get TeamCity to send notification emails

Hello. I am having trouble getting TeamCity to send notification emails.

  • I can see that the group "all users" have a notification rule that appears to be correct ("notify me when i break the build")
  • I have tested my email settings and TeamCity can indeed send emails to me (button test connection in administration > email settings)
  • I have made sure that my emailadress is set on my profile page
  • I have looked through the logs but cannot se anythin suspicious regarding email
  • I have trashed the build deliberately by checking in something that generates a compile error
  • I have also tried to edit the notification rule so that successful builds causes an email to be sent without success
  • I have checked my spam folder, nothing there. I am able to recieve test emails from TeamCity
  • Using Teamcity version 9.0.x, Windows server 2012 R2 Standard.
  • I have verified that the notifier is enabled (Administration > Email Notifier)
  • I have also tried to add a specific rule on my profile page > Email notifications, but even now I am not getting any emails

This is what my generic notification rule looks like:
Does anyone have any idea what could be wrong?
Comment actions Permalink


Do you receive emails for other then "Builds affected by my changes" rules? For example for a user-specific rule "Builds from the selected project" > " Build fails".
Please check that Version Control Username Settings are correct.
Please enable debug-notifications logging preset on Administration>Diagnostics page, reproduce the issue and attach teamcity-notification.log.

Comment actions Permalink

Thanks a lot for the suggestions. I added a general rule for "'Root project" and that made TeamCity send the emails. However, this does not solve my requirement, what I want is for all users accounts in TeamCity to recieve email when the build fails (affected by their change) without each user having to go inside their user profile and making changes to the notification rules. This is because some users will never even log in to TeamCity.

Isn't it possible to specify a global rule like that?

I also verified that my VCS Username settings are correct. I am using TFS and if I do tf.exe myfile.txt /user:theusernamespecifiedinteamcity I am able to see my changes so it seems that this is correct. Also, all automatic triggering and change details in TeamCity works fine.

Comment actions Permalink

Sorry for delay. Please open one of the builds, go to Changes tab > hovering the mouse cursor over the user name in the table. Are the VCS username and TeamCity user name correct?
If no, then please specify correct VCS username for TeamCity users.
If yes, then please provide an exact example of build for which notification has not been sent and attach teamcity-notification.log file in debug mode.

Comment actions Permalink

Ok so I think I got it working now:
When not working, my "Version Control Username Settings" was set to "emil". When TeamCity detected a change in VCS, the username that triggered the change was "mydomain\emil", which made TeamCity unable to map the change to a TeamCity user. Hovering the username like you suggested, TeamCity username was UNKNOWN.

See screenshots below.

Excerpt from notifications log:
Processing event BUILD_STARTED in build type ... [2015-04-08 07:34:31,988]
DEBUG - RulesAwareNotificationListener - Selected 0 users with matching notification rules <== WHAT? 0 users, this is weird



However, what I dont understand is why I was able to recieve notifications when I set up a specific rule for my user? Even with the "errorneous/domain-less" vcs username? As if TeamCity under these circumstances could suddenly map changes in the vcs triggered by "mydomain\emgo" to the TeamCity user with VCS username "emgo" (domain-invariant username mapping great success???).

Comment actions Permalink

Sorry for delay.
>why I was able to receive notifications when I set up a specific rule for my user? 
What kind of user specific rule was configured?
If you set up a specific rule for user, for example "Builds from the selected project" > " Build fails", then TeamCity just sends email to the user's email address and does not check the correspondence of VCS and TeamCity user's names.


Please sign in to leave a comment.