Adding a png image and table html while sending email in Jenkins

时光总嘲笑我的痴心妄想 提交于 2019-12-11 04:20:07

问题


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.



来源:https://stackoverflow.com/questions/31732095/adding-a-png-image-and-table-html-while-sending-email-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!