How can I send an email status and reports from gradle scripts?

How can I send an email status and reports from gradle scripts?

You could add the JavaMail library to your build script’s classpath and write a task that uses the library’s API to send emails.