Sending mail from pipeline not working

27 views
Skip to first unread message

Thorsten Meinl

unread,
Feb 27, 2017, 6:00:00 AM2/27/17
to Jenkins Users
Hi,

I am unable to send any mail from pipeline jobs using

step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'me@mail'])

The mail just isn't sent. Sending mails works perfectly in freestyle jobs. Is this a bug or am I missing something?

Thanks,

Thorsten

Daniel Beck

unread,
Feb 27, 2017, 6:06:13 AM2/27/17
to jenkins...@googlegroups.com

> On 27.02.2017, at 12:00, Thorsten Meinl <thorste...@knime.com> wrote:
>
> The mail just isn't sent.

Anything interesting in the build log?

Thorsten Meinl

unread,
Feb 27, 2017, 6:49:00 AM2/27/17
to Jenkins Users, m...@beckweb.net

Anything interesting in the build log?

Nope, only

[Pipeline] stage
[Pipeline] { (Send mail)
[Pipeline] step
[Pipeline] }
[Pipeline] // stage
 

Baptiste Mathus

unread,
Mar 1, 2017, 3:53:42 AM3/1/17
to jenkins...@googlegroups.com, Daniel Beck
Out of curiosity, why are you using the "step" step, instead of plain "mail" or "email" one. I can confirm mail is working for us, and email too for sure. So I would look into the server logs, maybe your email is getting refused out for some reason due to the content or so.

Did you try using the snippet generator to get the right syntax?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ff777064-1eaf-43a6-9079-fdc67df074bf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thorsten Meinl

unread,
Mar 1, 2017, 3:56:30 AM3/1/17
to Jenkins Users, m...@beckweb.net, m...@batmat.net
Afaik I have to configure the contents of "mail" myself. However, I just want the same mail sent by pipeline jobs as by freesytle jobs, i.e. depending on the job's status with different subjects, etc. I checked the mail server's log files and no sign of any mails sent from pipelines.
This whole pipeline stuff seems very buggy to me, not being able to send mails is just one of many issues...


On Wednesday, March 1, 2017 at 9:53:42 AM UTC+1, Baptiste Mathus wrote:
Out of curiosity, why are you using the "step" step, instead of plain "mail" or "email" one. I can confirm mail is working for us, and email too for sure. So I would look into the server logs, maybe your email is getting refused out for some reason due to the content or so.

Did you try using the snippet generator to get the right syntax?
2017-02-27 12:48 GMT+01:00 Thorsten Meinl <thorste...@knime.com>:

Anything interesting in the build log?

Nope, only

[Pipeline] stage
[Pipeline] { (Send mail)
[Pipeline] step
[Pipeline] }
[Pipeline] // stage
 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages