【发布时间】:2015-11-05 10:11:23
【问题描述】:
我在 Pre-Send Script 中输入了这个简单的行:
msg.setContent("Hi there!" , "html/text");
当我收到电子邮件时,正文是空的,并附有一个包含 Hi there! 的文件。
我需要做什么才能在电子邮件正文中显示?
【问题讨论】:
标签: jenkins jenkins-plugins email-ext
我在 Pre-Send Script 中输入了这个简单的行:
msg.setContent("Hi there!" , "html/text");
当我收到电子邮件时,正文是空的,并附有一个包含 Hi there! 的文件。
我需要做什么才能在电子邮件正文中显示?
【问题讨论】:
标签: jenkins jenkins-plugins email-ext
您编写了错误的 mime 类型。以下应该有效:
msg.setContent("Hi there!" , "text/html"); // not "̶h̶t̶m̶l̶/̶t̶e̶x̶t̶"̶
可以在here 找到可用的 mime 类型的完整列表。
【讨论】: