diff --git a/Jenkinsfile b/Jenkinsfile index dc1a488..c1f3910 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,16 +87,20 @@ } stage('Send report') { - try{ - mail subject: env.JOB_NAME, - body: 'test', - to: 'rene.forstner@nttdata.com', - replyTo: 'rene.forstner@nttdata.com', - from: 'coco-apm@bmw.de' - - } - catch ( mailExc ){ - echo "Sending Email Failed: ${mailExc}" + steps { + script { + try { + mail subject: env.JOB_NAME, + body: 'test', + to: 'rene.forstner@nttdata.com', + replyTo: 'rene.forstner@nttdata.com', + from: 'coco-apm@bmw.de' + + } + catch ( mailExc ){ + echo "Sending Email Failed: ${mailExc}" + } + } } } }