Email Notification CC'ed to user group

Hi, I was wondering if we can customize or add a couple more settings to the email notification.

For example, when I receive a build failed message, I know that I can set it so that the persons check-in who broke the build will receive the e-mail, but is it possible so that the email also CC'ed instead of 'To' to a mailing list or everyone in a certain user group?

11 comments
Comment actions Permalink

I just had the exact same issue. What I did to solve this, for anyone else who wants to do the same, was to create a new user. The new user represents our team mailing list and listens to the configurations in question. I think this will work out.

0
Comment actions Permalink

Hi Lawrence, Daniel,

If you use TeamCity prior to 5.1, this feature isn't provided out of the box, and I think the only thing left is a workaround suggested by Daniel.
Since 5.1 notification system becomes more flexible and powerful. In particular you can specify your own email headers for any event. In fact you can use the whole power of FreeMarker to decide what to send for a particular build.

For more information please see http://confluence.jetbrains.net/display/TCD5/Customizing+Notifications+%28in+TeamCity+5.1%29


---
Maxim

0
Comment actions Permalink

Thanks fantastic, but how do I do it. I've checked the documentation and looked at the templates on disk but cant see where to put the CC in.

I expected to see something in common.ftl.

I tried adding the following to the above file with no results:

<#global headers>
  CC: someDude@somewhere.com
</#global>

Any ideas?

Thanks for any help.

Keith

0
Comment actions Permalink

Hi Keith,

The described approach should work. I'll try to reproduce it.
In the meantime could you please try to add these "headers" to the specific event, like "build_failed.ftl" and see what happens.


---
Maxim

0
Comment actions Permalink

Hi Keith,

Any news?
Everything worked out no my tests.


---
Maxim

0
Comment actions Permalink

Hi Maxim,

I tried what you suggested by putting it in buildfailed.ftl; Now i am getting mail with cc header set as i mentioned in template but the email mentioned in cc is not getting any mail.
Can you help me in this?

0
Comment actions Permalink

Hi,

Please try "Cc", may be it is case-sensitive.
If that doesn't help, please provide us with the raw email message that was sent.


--
Maxim

0
Comment actions Permalink

hi maxim,
I tried Cc as well but still the same result.

Here are the intenet headers of the mail:

Received: from SNCEXAMMB3.corp.nai.org (x.x.x.x) by DALEXHT2.corp.nai.org

(x.x.x.x) with Microsoft SMTP Server (TLS) id 8.3.213.0; Fri, 3 Feb 2012

02:43:09 -0600

Received: from x.x.x.x (x.x.x.x) by mail.na.nai.com (x.x.x.x)

with Microsoft SMTP Server id 8.3.213.0; Fri, 3 Feb 2012 00:43:07 -0800

Date: Fri, 3 Feb 2012 14:12:55 -0800

From: <samarth_rastogi@mcafee.com>

To: <samarth_rastogi@mcafee.com>

Message-ID: <5672039.10.1328307175937.JavaMail.SYSTEM@W-XP-P-SP2-T>

Subject: [TeamCity, FAILED] Build Test::test #146

MIME-Version: 1.0

Content-Type: multipart/alternative;

    boundary="----=_Part_9_21336018.1328307175046"

CC: "Singhal, Ankit" <Ankit_Singhal@McAfee.com>

Return-Path: samarth_rastogi@mcafee.com



If you need any other info, let me know.

Thanks

0
Comment actions Permalink

Will it help if you set:
Cc: Ankit_Singhal@McAfee.com

without name before email?


--
Maxim

0
Comment actions Permalink

I tried that as well but its not working...

0
Comment actions Permalink

Hm, That's weird. Are you absolutely sure that emails are working for that address, and the message doesn't get to spam?
I'll try to reproduce it, but so far no clues what's wrong.


--
Maxim

0

Please sign in to leave a comment.