Email ext plugin to send HTML Junit reports in mail

5.3k Views Asked by At

I have used this below code in default content to generate text Junit test reports. ${JELLY_SCRIPT,template="text"} But now I wanted same in HTML format. I have changed content type to HTML and placed below code in default content - ${FILE,path="index.html"} But I am getting html code in my email. Where did I miss ? Any Suggestions..

3

There are 3 best solutions below

1
On BEST ANSWER

If you are seeing HTML code in you email, maybe you need to set the content type of the email to HTML(text/html).

You can change the Default Content Type to HTML(text/html) in the Jenkins System Configuration in the Extended E-mail Notification section. Alternatively you can change the content type in the Job configuration.

0
On

Instead of index.html , given path for those HTML files which are generated like all-tests.html. It worked fine. There may be a issue with frames.

1
On

If you are using Email ext plugin, then go to your workspace, there should be an 'emailable-report.html' generated. So set the correct path in default content like this:

${FILE,path="path/to/your/emailable-report.html"}