CruiseControl.NET : Email Publisher cc.net mail 配置(建议初学者必看)
这几天每天晚上都在学着使用cc.net,其他模块都挺好配置的,唯独mail设置耗时很久,原因网上也没什么很好的说明文字,特将我的调试过程记录如下(第二点对于像我这样的初学者要仔细看):
一:配置文件一定要写对,一定要仔细写,比我我很丢脸的就把我的mailhostUsername的节点设置错了两次,“*****”没有加"qq.com"; "qq.co"少加了一个字母“m”,虽然这让,配置文件验证工作CCValidator不会报错,但肯定会运行失败 我copy一份我本地的供大家参考:
<email mailport="25" includeDetails="TRUE" mailhostUsername="*****@qq.com" mailhostPassword="******" useSSL="FALSE">
<from>******@qq.com</from>
<mailhost>smtp.qq.com</mailhost>
<users>
<user name="*1" group="leader" address="****@hotmail.com" />
<user name="*2" group="teamleader" address="*****@163.com" />
<user name="*3" group="buildmaster" address="****@126.com" />
<user name="*4" group="developers" address="******@qq.com" />
</users>
<groups>
<group name="CTO">
<notifications>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="teamleader">
<notifications>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="developers">
<notifications>
<notificationType>Failed</notificationType>
<notificationType>Fixed</notificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<converters>
<regexConverter find="{1}quot; replace="@qq.com" />
</converters>
<modifierNotificationTypes>
<NotificationType>Failed</NotificationType>
<NotificationType>Fixed</NotificationType>
</modifierNotificationTypes>
<subjectSettings>
<subject buildResult="StillBroken" value="Build is still broken for {CCNetProject}" />
</subjectSettings>
<xslFiles>
<file>xsl\header.xsl</file>
<file>xsl\compile.xsl</file>
<file>xsl\unittests.xsl</file>
<file>xsl\modifications.xsl</file>
</xslFiles>
<attachments>
<file>E:\testspace\CCnetgroup\first\other\AFile.txt</file>
<file>Relative.txt</file>
</attachments>
</email>
二:一定要把邮箱的smtp打开,因为我看cc.net只支持smtp,而且大部分邮箱都默认smtp为关闭状态,由于这个原因,CCValidator会报 unused node异常; 我以qq邮箱为例,设置截图如下: