find jenkins jobs for email address

import hudson.tasks.Mailer
import hudson.plugins.emailext.ExtendedEmailPublisher

def mail = 'foo@bar.com'

Jenkins.instance.getAllItems(AbstractItem.class).collect{ Jenkins.instance.getJob( it.fullName ) }.findAll { job ->
  job?.getPublishersList()?.any {
    (it instanceof Mailer && it.recipients =~ mail) || (it instanceof ExtendedEmailPublisher && it.recipientList =~
mail)
  }
}.collect{ it.fullName }