Commit 7083c7e2 authored by Jules Sabban's avatar Jules Sabban
Browse files

Add basic email sending command #5

parent cb01a41e
Pipeline #40479 failed with stages
in 31 seconds
......@@ -348,8 +348,12 @@ workflow.onComplete {
// Send the HTML e-mail
if (email_address) {
// Catch failures and try with plaintext
[ 'mail', '-s', subject, email_address ].execute() << email_txt
log.info "[$name_wf] Sent summary e-mail to $email_address (mail)"
try {
def sending = [ 'echo', '-e' , email_txt ].execute() | [ 'mail', '-s', subject, email_address ].execute()
log.debug "[$name_wf] Sent summary e-mail to $email_address (mail)"
} catch (all) {
log.error "[$name_wf] ERROR ON EMAIL SENDING TO $email_address !!"
}
log.info "$email_txt"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment