If you want to use the maven project configuration to send email, use maven for this task. It will work for any environment and CI tool you choose.
Provide the profiles 'build-success' + 'build-failed' with the maven-changes-plugin configured in your pom.xml.
Add the appropriate calls to the post-build processing:
mvn changes:announcement-mail -P build-success
mvn changes:announcement-mail -P build-failure`
source
share