How can I configure a different sender email address for each build?
1,880 views
Skip to first unread message
Aaron Kushner
unread,
Jun 20, 2012, 4:36:52 PM6/20/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
I'd like the email sender address to be a different group email address for each build type. I use a single Jenkins instance for various builds (hadoop, mysql, various apache projects, etc) and each of these builds has a team responsible for the outcomes and questions.
I looked at the presend option on the email-ext plugin, but had no idea whether I could change the sender with that or how to configure it.
Any suggestions or help would be appreciated.
Slide
unread,
Jun 20, 2012, 4:40:54 PM6/20/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
With email-ext 2.22 you should be able to change the sender in the
pre-send groovy script (this is a per project script). It provides
access to the MimeMessage object in the script, see [1] for more
information.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
Before posting my questions, I looked through all the templates and code for the mail-ext plugin and was still unclear on how to do this. Can you point me to a script/code that I might have missed.
Aaron Kushner
unread,
Jul 6, 2012, 1:42:17 PM7/6/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
Here's the answer. Put the following in the pre-send script box.