How to include content of the html file to template of the jenkins email-ext? How to include content of the html file to template of the jenkins email-ext? jenkins jenkins

How to include content of the html file to template of the jenkins email-ext?


It looks like most easy way is to use 'Pre-send Script' of the Email-ext

Script looks like this:

def reportPath = build.getWorkspace().child("HealthTestResults.html")msg.setContent(reportPath.readToString(), "text/html");

It renders content of the HealthTestResults.html located in the root of the workspace just as body of the message.


Easy way to include the html file to email content is to add below line in the default content = ${FILE, path="yourfilename.html"}

this works for me in jenkins email ext plugin


I try it using


def reportPath = build.getWorkspace().child("HealthTestResults.html")msg.setContent(reportPath.readToString(), "text/html");

But the email sent out is like this:


Frame AlertThis document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.


Do you know the reason?Mike Chaliy