I was able to use the below script  to iterate through email address, but 
the problem is even this doesn't display addresses in the trigger

import hudson.plugins.emailext.*
import hudson.model.*
import hudson.maven.*
import hudson.maven.reporters.*
import hudson.tasks.*

// For each project
for(item in Hudson.instance.items) {
  println("JOB : "+item.name);
  // Find current recipients defined in project
  if(!(item instanceof ExternalJob)) {
  if(item instanceof MavenModuleSet) {
    println(">MAVEN MODULE SET");
    // Search for Maven Mailer Reporter
    println(">>Reporters");    
    for(reporter in item.reporters) {
      if(reporter instanceof MavenMailer) {
        println(">>> reporter : "+reporter+" : "+reporter.recipients);
      }
    }
  } else
  if(item instanceof FreeStyleProject) {
    println(">FREESTYLE PROJECT");
  }
  println(">>Publishers");    
  for(publisher in item.publishersList) {
    // Search for default Mailer Publisher (doesn't exist for Maven 
projects)
    if(publisher instanceof Mailer) {
      println(">>> publisher : "+publisher+" : "+publisher.recipients);
    } else
    // Or for Extended Email Publisher
    if(publisher instanceof ExtendedEmailPublisher) {
      println(">>> publisher : "+publisher+" : "+publisher.recipientList);
    }
  }   
  } else {
  println("External Jobs cannot have MailNotificationsRecipients")
  }
  println("\n=======\n");
}


Thanks,
Maneesh
On Thursday, January 16, 2014 5:11:50 PM UTC-8, slide wrote:
>
> The easiest way is to use the script console. You need to iterate through 
> your projects, get the publisher list, find the email-ext publisher and 
> then modify the properties you need to for the recipient.
> On Jan 16, 2014 4:29 PM, "Maneesh M P" <manees...@gmail.com <javascript:>> 
> wrote:
>
>> Configure slicing plugin does not display the address specified inside 
>> email triggers 
>>
>> Thanks,
>> Maneesh
>>
>> On Thursday, January 16, 2014 3:15:58 PM UTC-8, Daniel Beck wrote:
>>>
>>> Configuration Slicing plugin *might* work. 
>>>
>>> On 17.01.2014, at 00:09, Maneesh M P <manees...@gmail.com> wrote: 
>>>
>>> > I have more than 300+ jobs configured in my jenkins and I am using 
>>> email ext plugin to configure the mail trigger.  currently i am in a 
>>> situation where I have to change one recipient mail address to something 
>>> else 
>>> > Is there an easy way to do it? 
>>> > 
>>> > Thanks, 
>>> > M 
>>> > 
>>> > -- 
>>> > 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. 
>>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>>
>>>  -- 
>> 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 <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to