sachin
sachin

Reputation: 685

how to send mail using ant?

How to send mail to a respective user using ant.

I am executing few tests using ant and need to inform the user about the status of the tests executed. So is there any means by which i can accomplish this ?

Regards: Sachin

Upvotes: 2

Views: 8881

Answers (1)

user371320
user371320

Reputation: 1398

Use the SMTP mail task.

http://ant.apache.org/manual/Tasks/mail.html

Example:

<mail mailhost="smtp.myisp.com" mailport="1025" subject="Test build">
  <from address="[email protected]"/>
  <replyto address="[email protected]"/>
  <to address="[email protected]"/>
  <message>The ${buildname} nightly build has completed</message>
  <attachments>
    <fileset dir="dist">
      <include name="**/*.zip"/>
    </fileset>
  </attachments>
</mail>

Upvotes: 6

Related Questions