sending emails from ANT

Hi All,

This is perhaps the most hottest feature of ANT to send emails from build script. By this task we can achieve email notifications about build creation, Send code metrics, code reviews reports etc.

Note you need to configure SMTP port, before using that.

<mail mailhost=”smtp.myisp.com” mailport=”1025″ subject=”Test build”>
<from address=”config@myisp.com”/>
<replyto address=”me@myisp.com”/>
<to address=”all@xyz.com”/>
The ${buildname} nightly build has completed
<attachments>
<fileset dir=”dist”>
<include name=”**/*.zip”/>
</fileset>
</attachments>
</mail>


Thanks
R Vashi

Advertisements