title: How to send email with Jenkins and an parameter address?
body: <p>I'm using Jenkins and I would like to send an email after finished job. The problem I have is that I want to use the username defined before into a parameter in the configuration. I try to use then ${username} but i doesn't work. This is the error I get:</p>
  
  <pre><code>Sending e-mails to: ${username}@email.es
  ERROR: Invalid Addresses
  javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
  com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 &lt;${username}@email.es&gt;... User unknown
  
  at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1835)
  at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
  at javax.mail.Transport.send0(Transport.java:195)
  at javax.mail.Transport.send(Transport.java:124)
  at hudson.tasks.MailSender.run(MailSender.java:126)
  at hudson.tasks.MailSender.execute(MailSender.java:101)
  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1064)
  at hudson.model.Run.execute(Run.java:1764)
  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
  at hudson.model.ResourceController.execute(ResourceController.java:89)
  at hudson.model.Executor.run(Executor.java:240)
  Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 &lt;${username}@email.es&gt;... User unknown
  
  at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1686)
  ... 10 more
  </code></pre>
  
  <p>It is not taking the value of the parameter. Is thera any plugin or way to do this ?</p>
  
  <p>Thanks for your help.</p>