【问题标题】:Jenkins email-ext Pre-send groovy script is resuting in attachementJenkins email-ext Pre-send groovy 脚本导致附件
【发布时间】:2015-11-05 10:11:23
【问题描述】:

我在 Pre-Send Script 中输入了这个简单的行:

msg.setContent("Hi there!" , "html/text");

当我收到电子邮件时,正文是空的,并附有一个包含 Hi there! 的文件。

我需要做什么才能在电子邮件正文中显示?

【问题讨论】:

    标签: jenkins jenkins-plugins email-ext


    【解决方案1】:

    您编写了错误的 mime 类型。以下应该有效:

    msg.setContent("Hi there!" , "text/html"); // not "̶h̶t̶m̶l̶/̶t̶e̶x̶t̶"̶
    

    可以在here 找到可用的 mime 类型的完整列表。

    【讨论】:

      猜你喜欢
      • 2021-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多