在支持HTML的电子邮件中将HTML内容转换为纯文本

在支持HTML的电子邮件中将HTML内容转换为纯文本,html,jenkins,jenkins-pipeline,jenkins-plugins,jenkins-groovy,Html,Jenkins,Jenkins Pipeline,Jenkins Plugins,Jenkins Groovy,我正在使用构建失败分析器Jenkins插件,我定义了构建失败的原因 现在,我想存储故障原因输出并通过电子邮件发送。因此,我在我的管道中使用了以下电子邮件扩展插件- post { failure { script { def subject = "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER}" def buildFailure = tm('${BUILD_FAILURE_A

我正在使用构建失败分析器Jenkins插件,我定义了构建失败的原因

现在,我想存储故障原因输出并通过电子邮件发送。因此,我在我的管道中使用了以下电子邮件扩展插件-

 post {  
    failure {
        script {   
           def subject = "${env.JOB_NAME} - Build # ${env.BUILD_NUMBER}"
           def buildFailure = tm('${BUILD_FAILURE_ANALYZER}')

    emailext attachLog: false,
        body:  buildFailure,
        subject: subject,
        to: "testemail@test.com"
        }
}
在Jenkins的电子邮件扩展配置中,如果
默认内容类型
的值为
纯文本(text\html)
,我将在电子邮件中获得如下内容-

Identified problems:
* Code compilation failed Actions:
 1. Please click on below indication link to know the compilation failure
 2. Please resolve compilation errors
  * Indication 1:
    <http://localhost:9090//job/EmailPipelineCopy/15/consoleFull#1856183693ffa56480-b39d-4982-9c6e-524135dff05e>
二,。请解决编译错误*指示1:

这是不好的显示和链接也不可用。我需要将
默认内容类型设置为
HTML(text\HTML)
,因为电子邮件中的其他内容都是HTML

我们有没有办法将此HTML内容更改为文本,这样它就会出现在电子邮件中,并带有链接和适当的对齐方式,就像默认内容类型一样?
=
HTML(text\HTML)

我从文本中删除了
字符,并用
标记将其包围,然后HTML按原样处理该文本

Identified problems: * Code compilation failed Actions: 1. Please click on below indication link to know the compilation failure