Sending email from jenkins pipeline

萝らか妹 提交于 2020-04-18 05:35:49

问题


Hi I am trying to send email notification from jenkins pipeline but it is not sending any email. I am using the below script to send email:

pipeline {
    agent any 
    stages{
        stage('Test'){
            steps{
                echo 'Ok'
            }
        }
        stage('Email'){
            steps{
                emailext (to: 'abc@xyz.com', replyTo:'abc@xyz.com', subject: "Email report from - '${env.JOB_NAME}'", body: 'test')
            }
        }
    }
}

The pipeline is being executed but I am not receiving any mail.

来源:https://stackoverflow.com/questions/60996636/sending-email-from-jenkins-pipeline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!