This page last changed on May 19, 2005 by orogers.
The email publisher can be used to send email to any number of users. It is common to include one user who gets an email for every build and then also send email to every developer who checked code in for this build. People tend to prefer to use CCTray rather than email for instant notification these days.
<email from="buildmaster@mycompany.com" mailhost="smtp.mycompany.com" includeDetails="TRUE">
<users>
<user name="BuildGuru" group="buildmaster" address="buildguru@mycompany.com"/>
<user name="JoeDeveloper" group="developers" address="joedeveloper@thoughtworks.com"/>
</users>
<groups>
<group name="developers" notification="change"/>
<group name="buildmaster" notification="always"/>
</groups>
</email>
Node | Description | Type | Required |
mailhost | The SMTP server that CruiseControl.NET will connect to to send email. | string | true |
from | The email address that email will be marked as coming from. | string | true |
projectURL | Deprecated: this duplicates the webURL element in the Project Configuration Block. | string | false |
users | A set of <user> elements that define who to send emails to. | complex | true |
groups | A set of <group> elements that identify which the notification policy for a set of users. | complex | false |
Node | Description | Type | Required |
name | The user name of a user. For 'real' users, this should match the user name in Source Control. | string | true |
group | The group that the user is in. This needs to match the name of one <group> elements. | string | true |
address | The (internet form) email address of the user. | string | true |
Node | Description | Type | Required |
name | The name of the group, which corresponds to the 'group' values used in the <user> tags. | string | true |
notification | Determines when to send email to this group. There are two possible notification values:
- "always" - send email when any build occurs
- "change" - send email when the status of the build changes (e.g. from 'passed' to 'failed').
| string | true |
You may experience an exception that looks like this when the ccnet server tries to send an email:
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
This is likely due to not having CDO properly installed on the build server. To fix this, make sure that you have some sort of email client installed (Outlook Express is probably there by default). Outlook Express doesn't actually initialise CDO until you actually open it, so try and use the client to send an email just to verify that everything works.
Are there attributes for specifying login for the SMTP server? chrs,
Mads Nissen
mads.nissen@objectware.no
Posted by at Apr 23, 2004 02:44
|
No - we're using the standard email classes in .NET. In .NET 1.0 there is no way of assigning authenticated SMTP options, but in .NET 1.1 there is. At the moment we're trying to stay totally compatible between the 2 .NET versions so won't add this option right now.
A work around is to setup the Windows SMTP Server on the same machine as your build server (and use appropriate security options.) It can relay to your actual mail server, and your build server can then use the SMTP server on localhost.
Posted by mroberts at Apr 23, 2004 03:40
|
I'm a newbie with cruisecontrol.net. How do I know where the projectURL (cruise control.net web app) is located? I will be using email publisher.
Posted by at May 11, 2004 08:14
|
the projectURL property should point to the url at which you installed the CruiseControl.NET web app. so if you installed the web app on server: foo using the virtual path: bar, you should set the projectURL property to http://foo/bar. am i correctly understanding your question?
Posted by orogers at May 12, 2004 03:50
|
It would be nice if you added an attribute to set the Reply-To header. That way email could be marked as being "From" ccnet-builder@company.com without there actually being such an address. Replies would be sent to the project leader, for instance. It would be misleading to have the email actually come "From" his address; he is not sending these mails, he should just get any replies to them. This seems trivial to do with the .Net standard email classes.Makes sense?
Posted by gthb at Jun 21, 2004 07:02
|
In the example, the projectUrl is http://buildserver/myproject which sounds like it points to the build deliverables, rather than the CC.Net webapp displaying information about the build. But clearly the CC.Net webapp is what was intended (since CC.Net tacks ?log=logXXX.xml onto the URL to select the build to display; this parameter has no meaning for the app I'm building).So shouldn't projectUrl rather be http://mybuildserver/ccnet in this example? That would be in sync with the webURL used in the ccnet.config page, http://mybuildserver/ccnet Come to think of it, that begs the question: why is the URL to the CC.Net webapp being given again here? The same URL is already specified for each project, in the webUrl property, right?
Posted by gthb at Jun 23, 2004 04:11
|
CruiseControl is running extremely well with the exception of the email publisher; it's not working. Thought it could be a problem outside of cc, I am not seeing any output in the console saying that emails are being send when a build breaks. I have one group for developers set to "always" receive email. Please let me know if there are some small things I may be overlooking. Thank you for your time in advance.
Posted by bemizerany at Aug 12, 2004 12:25
|
Blake, I found an email from Matt Steele, he indicated a problem with the .config file. The xsl links were in the wrong location for him. This hit me like a brick on the head and I realized that my ccservice.exe.config is located on the C:\ drive and my CC.Net files run from the D:\ drive. So I went in and added the fully qualified location of the XSL files and it worked like a dream.Good Luck. -Josh
Posted by at Sep 23, 2004 08:51
|
|