How to resolve an AuthenticationFailedException ?

I am trying to get the email notification feature to work on team city.
I have the notification settings configured to send me an email when the build starts and when it ends/fails.
However I am not receiving any emails when builds start/end and team city's logs reveal the following exception:

ERROR - ication.email.EMailNotificator - Cannot send email notification:javax.mail.AuthenticationFailedException

My email-config looks like this:

(email server's ip, company name and my password have been intentionally obscured in this post.)


.... ]]>

I have verified that there is no typo in the email or password.

I have also tried replacing 'sachind@mycompanyname.com' with 'sachind' and email-server from 'xx.xx.x.x' to 'mail.mycompanyname.com' (the dns name of the mail server my company uses). The mail server is an MS Exchange server that requires user/password authentication for sending email.

Note that have I tried the email publisher that comes with cruisecontrol and it seems to work fine, so I think there is something about the way team city sends emails that my company's exchange server isn't liking.

The above issue is the one and only thing thing about Team City that is standing in the way of my recommending team city to management in place of cruise control:

Any help you could provide in helping me resolve this issue, will be very much appreciated.

thanks
Sachin

3 comments

Hello,

Did you try "Test connection" functionality for e-mail settings at /email/notificatorSettings.html ? Does it work for you?

Regards,
KIR

0

I am not an expert in MS Exchange, but I would try to specify username in the following format:
domain\username


--
Pavel Sher

0

I didn't know there was a /email/notificatorSettings.html page !

I was actually trying to find such as page but couldn't, so I went straight to the email-config.xml file and changed it.

So anyway, I was able to discover the cause of my problem once I went to the /email/notificatorSettings.html page.

The problem was that the 'email-from' field was set to TeamCity, while my company's internal mail server will accept email from me, only if 'email-from' is also set to my login name.

Thanks for sending the pointer to the /email/notificatorSettings.html page.

0

Please sign in to leave a comment.