Class to send email notifications.
def m = new Email(this)
m.send(
subjectTag : 'FAILURE',
to: : 'also-to-me@gmail.com',
body : '<p>Test failed!</p>',
addProviders : true
)
| Type | Name and description |
|---|---|
java.lang.Object |
stepsReference to the groovy pipeline variable. |
| Constructor and description |
|---|
Email
(java.lang.Object steps)Constructs the class. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
send(EmailArguments args)Send an email. |
|
void |
send(java.util.Map arguments)Send an email. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructs the class.
When invoking from a Jenkins pipeline script, the Pipeline must be passed the current environment of the Jenkinsfile to have access to the steps.
def o = new Email(this)
steps - The workflow steps object provided by the Jenkins pipelineSend an email.
The email will contain [args.subjectTag] as the first string content followed by the
job name and build number
args - Arguments available to the email command.Send an email.
arguments - A map that can be instantiated as EmailArguments.Groovy Documentation