title: How to automatically add mail recipients in Jenkins pipeline
body: <p>I am working on to send an email on build failure to the users who had committed the code in Jenkins. I am using pipeline script. But i am struck now as i am manually adding the username. How to automatically add recipient mail in Jenkins.</p>
  
  <p>Here is the code i have written.</p>
  
  <pre><code>emailtext attachLog: true,body: '', 
  compressLog: true,
  recipientProviders: [[$class: 'DevelopersRecipientProvider']],
  subject:'Test results'
  emailtext body : 'Commit failure', subject: 'Test-failure', to: 'abc@xyz.com'
  </code></pre>