在詹金斯发送电子邮件的同时添加一个PNG图像和表格html [英] Adding a png image and table html while sending email in Jenkins
问题描述
我使用Jenkins电子邮件扩展程序插件,并希望做两件事:
- 在电子邮件中附加一个png图像
- 并将html呈现到电子邮件中。
电子邮件应该包含png图片和呈现的html 。
如果我使用在Groovy中编写的预发送脚本附加png图像并将html呈现到消息体中,我不会收到附件。
如果我同时附加html文件和png图像,我会得到渲染图像,但是html文件显示为文件附件。
我应该怎么做才能在电子邮件正文中同时呈现html和img。
我有Jenkins ver。 1.614
添加附件并将默认内容设置为html文件的路径。不需要此预发送脚本:
注意:不要忘记设置适当的内容类型。
I am using Jenkins email extension plugin and would like to do two things:
- Attach a png image to the email
- 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
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.
这篇关于在詹金斯发送电子邮件的同时添加一个PNG图像和表格html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!