I'm trying to configure CC.NET to send email notifications. I have googled a lot about it and found examples also but by using those examples I'm not able to figure out where the actual problem is occuring.
Below is the block of code I'm using it in config file:
<publishers>
<statistics />
<xmllogger logDir="c:\TestCC\buildlogs" />
<email from="mehul.makwana@mycompany.com" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="mehul.makwana@mycompany.com" includeDetails="TRUE" >
<users>
<user name="Radha" group="buildmaster" address="radha.k@mycompany.com" />
<user name="Mehul" group="developers" address="mehul.makwana@mycompany.com" />
</users>
<groups>
<group name="developers" notifications="always" />
<group name="buildmaster" notifications="always" />
</groups>
</email>
</publishers>
The above config is passing in CC.NET config validator. How to configure it from scratch? I also want to show error logs in the Dashboard if the build is failing. I'm using nant script for building files.
You have the documentation for the email puiblisher here : http://confluence.public.thoughtworks.org/display/CCNET/Email+Publisher It is up-to-date and explains a lot.
From what I see in your configuration block, it lacks the mailhostPassword. And since CC.net 1.4 the notifications must be declared as follow :
<group name="developers">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
Concerning the content of the dashboard and email, you can edit it by modifying the list of xsl files in dashboard.config and ccservice.exe.config. More information here :
Cruise Control .Net not showing Nant build errors
Hope this helps
EDIT
I think your conf would look like that (with gmail smtp) :
<publishers>
<statistics />
<xmllogger />
<email from="myaccount@gmail.com" mailhost="smtp.gmail.com" mailport="587" useSSL="TRUE" mailhostUsername="myaccount@gmail.com" includeDetails="TRUE" mailhostPassword="YourGmailP@ssword" >
<users>
<user name="Radha" group="buildmaster" address="radha.k@mycompany.com" />
<user name="Mehul" group="developers" address="mehul.makwana@mycompany.com" />
</users>
<groups>
<group name="developers">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
</email>
</publishers>
if you have a smtp server in your company, let's say MailServerName the first line should be
<email from="mehul.makwana@mycompany.com" mailhost="MailServerName" mailhostUsername="mehul.makwana@mycompany.com" mailhostPassword="YourCompanyMailP@ssword" includeDetails="TRUE" >
>