-->

Adding a png image and table html while sending em

2019-08-10 20:54发布

问题:

I am using Jenkins email extension plugin and would like to do two things:

  1. Attach a png image to the email
  2. And also render html into the email message.

The email should contain both png image and rendered html.

If I attach png image and render html into message body using a pre-send script written in Groovy I do not get the attachment.

If I attach both html file and png image I get rendered image but the html file appears as a file attachment.

What should I do to get both html and img rendered in the email message body.

I have Jenkins ver. 1.614

回答1:

Add your attachment and set default content with a path to html file. Pre-send script not needed for this:

Note: do not forget to set appropriate content type.