-
Notifications
You must be signed in to change notification settings - Fork 730
Open
Description
It would be great if we could send in a shared-library resources that is our Email Ext. template, or if we could send in a body (as a string) to be processes as groovy or jelly.
For example, rather then the following call:
emailext subject: '$DEFAULT_SUBJECT', attachLog: attachLogs, body: 'This is our email body', recipientProviders: [developers(), requestor()]
We could do something like:
// This is a shared-library resource file. def mailContent = libraryResource('resources/email/template.groovy') emailext subject: '$DEFAULT_SUBJECT', attachLog: attachLogs, body: mailContent, bodyType: 'groovy', to: additionalRecipients, recipientProviders: [developers(), requestor()]
Originally reported by mdelaney, imported from: Allow loading templates from shared-library.
- status: Open
- priority: Minor
- component(s): email-ext-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 20251211-193728
Raw content of original issue
It would be great if we could send in a shared-library resources that is our Email Ext. template, or if we could send in a body (as a string) to be processes as groovy or jelly.
For example, rather then the following call:
emailext subject: '$DEFAULT_SUBJECT', attachLog: attachLogs, body: 'This is our email body', recipientProviders: [developers(), requestor()]We could do something like:
// This is a shared-library resource file. def mailContent = libraryResource('resources/email/template.groovy') emailext subject: '$DEFAULT_SUBJECT', attachLog: attachLogs, body: mailContent, bodyType: 'groovy', to: additionalRecipients, recipientProviders: [developers(), requestor()]
environment
Jenkins 2.387.2<br/>
Email Ext. 2.96
Reactions are currently unavailable