Jenkins CI,如何将重要性属性添加到电子邮件标头?
我希望 Jenkins 电子邮件具有“重要性”图标(在 Outlook 中)
如果我手动生成电子邮件 - 我可以通过在 SMTP 标头中添加这些属性来实现此目的: 优先级:高 重要性:高
有没有办法将它们添加到 Jenkins 电子邮件标题中?我找不到任何插件或选项可以做到这一点:(
I would like Jenkins emails to have "Importance" icon (in Outlook)
If I generate the email manually - I can achieve this by adding these properties in the SMTP header:
Priority:High
Importance:high
Is there way to add them into Jenkins email headers? I could not find any plugin or option doing that :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,目前不可能,但您可以将其添加到 Email-ext 插件,它具有一些其他标头的配置选项。
No, this isn't currently possible, but you could probably add this to the Email-ext plugin, which has configuration options for some other headers.
Jenkins emailExt 项目中有一个请求此功能的票证: https://issues.jenkins.io/browse/JENKINS-69592?jql=labels%20%3D%20email-ext
一位用户在评论中列出了解决方法:
代码只是添加一个 presendScript
presendScript: '''msg.addHeader("X-Priority" , "1")''')
There's a ticket requesting this feature in the Jenkins emailExt project: https://issues.jenkins.io/browse/JENKINS-69592?jql=labels%20%3D%20email-ext
One user listed a workaround in the comments there:
Code is just adding a presendScript
presendScript: '''msg.addHeader("X-Priority", "1")''')