专注

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

最近在用 CruiseControl.NET实现每日构建,其他配置起来都挺方便,就是在邮件设置上费了不少时间,我用的是CC.NET1.6,这个版本已经支持发送附件,如果使用外部邮箱,记得要把邮箱的smtp功能打开,下面是Mail配置的一个例子:

<email mailport="25" includeDetails="TRUE" mailhostUsername="*****@qq.com" mailhostPassword="******" useSSL="FALSE">  
                <from>******@sina.com</from>  
                <mailhost>smtp.sina.com</mailhost>  
                <users>  
                    <user name="*1" group="leader" address="****@sina.com" />  
                    <user name="*2" group="teamleader" address="*****@sina.com" />  
                    <user name="*3" group="buildmaster" address="****@126.com" />  
                    <user name="*4" group="developers" address="******@qq.com" />  
                </users>  
                <groups>  
                    <group name="CTO">  
                        <notifications>  
                            <notificationType>Success</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 {SProject}"/> 
                </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><!-- path to file --></file>                      
                </attachments>  
            </email>  

  

posted on 2012-03-06 18:16  中金黄金  阅读(281)  评论(0编辑  收藏  举报