Forum Discussion

678's avatar
678
Regular Contributor
5 years ago

Groovy Script to send html report via email body

I need Groovy Script to send HTML report via email body 

report generated by ReadyAPI and storing in c://reports/overview.html 

how can i send this HTML report via email body 

 

3 Replies

  • Radford's avatar
    Radford
    Super Contributor

    There may well be a better way, but have you looked at the Apache Commons Email library? You will have to download the library jar, and add it as an external library to Ready API. The user guide has an example of sending an HTML e-mail.

     

    If anyone know of a better way, particularly an out of the box way that doesn't require an external library please let us know.

    • royki's avatar
      royki
      Occasional Contributor

      It is important to know from where the ReadyAPI is executed and Report html file is generated. I want to mean if the execution and generation of report are handled by any CI tool like Jenkins/GitLab then it is easy to setup and send the report to dev or other team member.

      • 678's avatar
        678
        Regular Contributor

        Ready API is generating the reports under projectpath and we are not using any CI so i required once report generate of single html page i required to send that to the group which should go single page report on email body