user550738
user550738

Reputation:

how to get ANT script to send an email when the build succeeds or fails?

I have an ANT script that works fine.

When the build succeeds I'd like it to send an email that has "build succeeded" in the subject and include the build's console output as the email body.

When the build fails I'd like it to send an email that has "build failed" in the subject and include the build's console output as the email body.

Can someone tell me an easy way to do this? Thanks!

Rob

Upvotes: 1

Views: 1599

Answers (2)

Kalpesh Soni
Kalpesh Soni

Reputation: 7287

1st answer is right

however, I build all my stuff with jenkins, hence use that to send emails it integrates with ldap/active directory too

Upvotes: 0

buruzaemon
buruzaemon

Reputation: 3917

The ant mail logger should be what you need.

Upvotes: 1

Related Questions