Thursday, August 16, 2012

Email config in CruiseControl config.xml.
In Config.xml file add the below script and provide host name, user name , password etc.

<htmlemail mailhost="11.11.111.11"
                    returnaddress="email@domain.com"
                    buildresultsurl="http://localhost:8080/cruisecontrol/buildresults/MY_PROJECT_1"
                    skipusers="true"
                    spamwhilebroken="true"
                    mailport="25">
                    <failure address="from_email@domain.com" />
                    <success address="from_email@domain.com" />
  </htmlemail>


Email config in Ant script build.xml.

In Build.xml file add the below script and provide host name, user name , password etc.

<mail mailhost="${smtp.mailhost}" 
        mailport="${smtp.mailport}" 
        subject="Subject line from build.xml file"
        from="${user.emailID}" 
        tolist="${user.emailID}"
        encoding="mime" 
        messagemimetype="text/html" 
        user="from_email@domain.com
        password="password">
        <message>Your message here</message>
                 <attachments>
                           fileset dir="${dest.dir}">
                                   <include name="*.log"/>
                           </fileset>
                 </attachments>
 </mail>

No comments:

Post a Comment