Jenkins Scripted Pipeline - Is this possible to send a mail attachment

dero

I opened an old ticket without answers : How to send attachments through jenkins pipeline using mail

Do you know if it's possible to send an email attachment with mail . I know that it's possible to send it with emailext but it's not installed on our Jenkins and the team doesn't want to install it.

Please let me know if it's atleast possible because if it's not, it's a good reason to pressure the IT team in charge of the Jenkins :)

Thanks in advance

apr_1985

No you cannot send attachments with the built-in mail steps.

Its parameters are quite limited https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#mail-mail

You would need email-ext for this.

e.g. How to send email with attachment in jenkinsfile (Groovy Script)?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Jenkins scripted pipeline or declarative pipeline

Jenkins Scripted Pipeline: Groovy if statement

Scripted Jenkins pipeline: continue on fail

Jenkins scripted pipeline environment variable

choice equivalent in Jenkins scripted pipeline

Send mail with large attachment?

Send mail with file attachment

Mailgun send mail with attachment

send mail attachment powershell

send mail with attachment body

Is it possible to make a parameterized scripted pipeline in Jenkins by listing the parameters in actual script, not in job config

Jenkins Scripted Pipeline use global timestamps options

Understanding Jenkins Groovy scripted pipeline code

Jenkins - export a scripted pipeline into a shared lib

Scripted Jenkins pipeline, skip parallel part of stage

Jenkins scripted pipeline with sidecar MYSQL container for testing

How to use options in a Jenkins scripted pipeline?

Get upstream environment variables - Jenkins scripted pipeline

Jenkins scripted pipeline nested environment variable

Writing a Yaml file in Jenkins scripted pipeline

In scripted pipeline, how to get Jenkins build parameters

How to set environment variables in a Jenkins Scripted Pipeline?

Using a dockerfile with Jenkins Scripted Pipeline Syntax

Jenkins groovy scripted pipeline variables not substituting correctly

Send notification e-mail to upstream committer in Jenkins pipeline

Restart the pipeline from a particular stage in jenkins scripted pipeline

PHPMailer send mail but file attachment is not with it

Send pdf in attachment (Laravel Mail)

Sending a Mail on Jenkins Pipeline