我正在尝试配置CC.NET以发送电子邮件通知。我已经搜索了很多关于它的文章并找到了例子,但是通过使用这些例子,我无法弄清楚实际问题发生在哪里。
下面是我在配置文件中使用它的代码块:
<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>
以上配置传入CC.NET配置验证器。如何从头开始配置?如果构建失败,我还想在仪表板中显示错误日志。我正在使用nant脚本来构建文件。
答案 0 :(得分:9)
您在此处拥有电子邮件管理器的文档:http://confluence.public.thoughtworks.org/display/CCNET/Email+Publisher 它是最新的,并解释了很多。
从我在配置块中看到的,它缺少mailhostPassword。从CC.net 1.4开始,通知必须声明如下:
<group name="developers">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
关于仪表板和电子邮件的内容,您可以通过修改dashboard.config和ccservice.exe.config中的xsl文件列表来编辑它。更多信息:
Cruise Control .Net not showing Nant build errors
希望这有帮助
修改强>
我认为你的conf看起来像那样(用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>
如果你的公司有一个smtp服务器,那么让我们说第一行应该是MailServerName
<email from="mehul.makwana@mycompany.com" mailhost="MailServerName" mailhostUsername="mehul.makwana@mycompany.com" mailhostPassword="YourCompanyMailP@ssword" includeDetails="TRUE" >
&GT;