简体   繁体   中英

Send multiple email messages using email-ext plugin in Jenkins

I am using Jenkins email-ext plugin to send email messages. I would like to send 2 email messages - one with 1 attachment that is sent to 1 person and a second email with another attachment sent to another person.

Is that possible using this plugin? From what I have found in the documentation it seems that only one email can be sent.

Thanks in advance.

You could modify your process to use three Jenkins jobs; one for the build, and two for emailing. Use the Jenkins Parameterized Trigger Plugin to have the build job start the email jobs when it's done. You can either pass in the location to the zip files or some other parameter to know what zip file to use in the email jobs. In "Projects to build" you put the name of your email job. You will add two triggers; one for each email job, passing in unique parameters to each.

If you setup multiple triggers, multiple emails will be sent out. You can have multiple triggers of the same type as well, so if you want to send out two emails for failure, just add the failure trigger twice and setup different recipient lists. Each trigger can generate a separate email.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM