Hello
we use this script in the presend part of EmailExt plugin. It will change
the sender email address, if an environment variable is set.
I think you can easily adapt it to your needs
import javax.mail.Message.RecipientType
> import javax.mail.Address
> import javax.mail.internet.InternetAddre
There is a 'msg' object that is an instance of MimeMessage [1]. The 'build'
object is an AbstractBuild [2] instance. To modify the recipients, you
would want to do stuff with the 'msg' object.
1 -
http://geronimo.apache.org/maven/specs/geronimo-javamail_1.4_spec/1.6/apidocs/javax/mail/internet/Mi
Hi
I'm trying to add pre-send script and modify the recipients list using
groovy just like you mentioned , but I can't find relevant wiki for this.
Where I can see the API I can use inside the script.
only saw examples using 'build' and using 'User' APIs. is there any
build.Recipients = /***/ ?
I take this back.
${FILE,path="PATH"} worked. Environment variables does not.
I've updated https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
to actually state recipient list also honors email tokens.
--
You received this message because you are subscribed to the Google Groups
"J
On Tuesday, April 1, 2014 1:50:47 PM UTC+2, slide wrote:
>
> No, its been around for a long time and works for me just fine. It may
> depend on how you are setting the env variable. Ones that are set by build
> steps are not retained by Jenkins (nothing to do with email-ext) so keep
> that in
No, its been around for a long time and works for me just fine. It may
depend on how you are setting the env variable. Ones that are set by build
steps are not retained by Jenkins (nothing to do with email-ext) so keep
that in mind.
On Apr 1, 2014 4:43 AM, "Max Rydahl Andersen"
wrote:
>
>
> On Mo
On Monday, March 31, 2014 2:56:11 PM UTC+2, slide wrote:
>
> Environment variables work fine, you use the ENV token like ${ENV,
> var="YOURVAR"}. You could also use a presend script to modify the recipient
> list using a groovy script. See the wiki for more info.
>
No, the ${ENV style does no
Environment variables work fine, you use the ENV token like ${ENV,
var="YOURVAR"}. You could also use a presend script to modify the recipient
list using a groovy script. See the wiki for more info.
On Mar 31, 2014 1:24 AM, "Max Rydahl Andersen"
wrote:
> I found this issue: https://issues.jenkins
I found this issue: https://issues.jenkins-ci.org/browse/JENKINS-5942
it was closed as incomplete but as far as I can see it is exactly the
problem - not possible to access environment variables set by the build in
the actual mail.
On Monday, March 31, 2014 8:16:41 AM UTC+2, Max Rydahl Anderse
Hey,
Background:
I got a little script (https://github.com/maxandersen/jiralint) which is
used to take queries against Jira locating stale jiras or jiras with
missing/wrong information on them
and then generate a junit test xml report which then in turn makes jenkins
generate a build failure re
10 matches
Mail list logo