Email-ext plugin

Plugin Information

Plugin ID email-ext
Latest Release 2.10
Latest Release Date Jan 20, 2011
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin allows you to configure every aspect of email notifications. You can customize when an email is sent, who should receive it, and what the email says.

General

This plugin extends Hudson's built in email notification functionality by giving you more control.  It provides customization of 3 areas.

  • Triggers - Select the conditions that should cause an email notification to be sent.
  • Content - Specify the content of each triggered email's subject and body.  
  • Recipients - Specify who should receive a email when it is triggered.

Configuration

Global configuration

Before using email-ext on a project, you must configure some global settings.  Go to Hudson's System configuration page.  Manage Hudson -> Configure System

The section titled Extended E-mail Notification is where you can configure global email-ext properties.  The properties here should match the settings for your smtp mail server.  This section is set up to mirror Hudson's own email Publisher Reporter (It's different extension point), however there are a few additions.  The inputs labeled Default Subject and Default Content, allow you to configure the email content on a global level.  This can be used to greatly simplify the configuration you need to do for all projects.

Project configuration

For a project to use the email-ext plugin, you need to enable it in the project configuration page.  Select the checkbox labeled "Editable Email Notification" in the  "Post-build Actions" section.

Basic Configuration

There are three fields that you can edit when the plugin is enabled.

  • Global Recipient List - This is a comma (or whitespace) separated list of email recipients.  Allows you to specify a single recipient list for each email that is sent.
  • Default Subject - This allows you to configure a token (more about tokens later), that can be used to easily configure all email subjects for the project.
  • Default Content - Same as Default Subject, but for the email body instead of the subject.
Advanced configuration

To see the advanced configuration for the plugin, click the "Advanced" button.  This section allows you to specify recipients for each type of email trigger.  By default, the only trigger configured is the "Failure" trigger.  To add more triggers, select one from the dropdown, and it will be added to the list.  Once you have added a trigger, you have several options.  If you click "?" (question mark) next to a trigger, it will tell you what conditions must be met for it to send an email.

  • Send to Recipient List - Check this checkbox if you would like to have the email sent to the "Global Recipient List" configured above.
  • Send to Committers - Check this checkbox to send the email to anyone who checked in code for the last build.  The plugin will generate an email address based on the committer's id and an appended "default email suffix" from Hudson's global configuration page.  For instance, if a change was committed by someone with an id "first.last", and the default email suffix is "@somewhere.com", then an email will be sent to "first.last@somewhere.com"
  • More Configuration - Configure properties at a per-trigger level.
    • Recipient List - A comma (and whitespace) separated list of email address that should receive this email if it is triggered.  This list is appended to the "Global Recipient List" above.
    • Subject - Specify the subject line of the selected email.
    • Content - Specify the body of the selected email.
  • Remove - Click the delete button next to an email trigger to remove it from the configured triggers list.
Email tokens

The email-ext plugin uses tokens to allow dynamic data to be inserted into an email subject line or body.  A token is a string that starts with a $ (dollar sign) and is terminated by whitespace.  When an email is triggered, any tokens in the subject or content fields willto the list.  Once you have added a trigger, you have several options.  If you click "?" (question mark) next to a trigger, it will tell you what conditions must be met for it to send an email.

  • Send to Recipient List - Check this checkbox if you would like to have the email sent to the "Global Recipient List" configured above.
  • Send to Committers - Check this checkbox to send the email to anyone who checked in code for the last build.  The plugin will generate an email address based on the committer's id and an appended "default email suffix" from Hudson's global configuration page.  For instance, if a change was committed by someone with an id "first.last", and the default email suffix is "@somewhere.com", then an email will be sent to "first.last@somewhere.com"
  • More Configuration - Configure properties at a per-trigger level.
    • Recipient List - A comma (and whitespace) separated list of email address that should receive this email if it is triggered.  This list is appended to the "Global Recipient List" above.
    • Subject - Specify the subject line of the selected email.
    • Content - Specify the body of the selected email.
  • Remove - Click the delete button next to an email trigger to remove it from the configured triggers list.
Email tokens

The email-ext plugin uses tokens to allow dynamic data to be inserted into an email subject line or body.  A token is a string that starts with a $ (dollar sign) and is terminated by whitespace.  When an email is triggered, any tokens in the subject or content fields will be replaced dynamically by the actual value that it represents.  Also, the "value" of a token can contain other tokens, that will themselves be replaced by actual content.  For instance, the $DEFAULT_SUBJECT token is replaced by the text (and other tokens) that is in the Default Subject field from the global configuration page.  Similarly, the $PROJECT_DEFAULT_SUBJECT token will be replaced by the value of the Default Subject field from the project configuration page.

The email-ext plugin sets the email content fields with default values when you enable it for your project.  The Default Subject and Content fields on the project config page default to $DEFAULT_SUBJECT and $DEFAULT_CONTENT (respectively), so that it will automatically use the global configuration.  Similarly, the per-trigger content fields default to $PROJECT_DEFAULT_SUBJECT and $PROJECT_DEFAULT_CONTENT, so that they will automatically use the project's configuration.  Since the value of a token can contain other tokens, this provides different points of configuration that can allow you to quickly make changes at the broadest level (all projects), the narrowest level (individual email), and in between (individual project).

To see a list of all available email tokens and what they display, you can click the "?" (question mark) associated with the Content Token Reference at the top bottom of the email-ext section on the project configuration screen.

Jelly content

New to version 2.9 is the ability to use Jelly scripts. Jelly scripts are powerful in that you can hook into the Hudson API itself to get any information you want or need. There are two Jelly scripts packaged with the plugin and it is possible to write your own too.

There are two default Jelly scripts available out of the box; one is designed for HTML emails and the other is design for text emails. See the screenshots to the right for what these templates look like. You can specify which script you want by using the template argument. The usage for each script is the following:

  • Text only Jelly script: ${JELLY_SCRIPT,template="text"}
  • HTML Jelly script: ${JELLY_SCRIPT,template="html"}

You can also write your own Jelly scripts. The Jelly scripts are particularly powerful since they provide a hook into the Hudson API including hudson.model.AbstractBuild and hudson.model.AbstractProject. For example on how to do this, take a look at the existing html and text scripts.

Using custom Jelly scripts (those not packaged with email-ext) requires the cooperation of your Hudson administrator. The steps are relatively simple:

  1. Create the Jelly script. The name of the script should be <name>.jelly. It is important the name ends in .jelly.
  2. Have your Hudson administrator place the script inside HUDSON_HOME\email-templates.
  3. Use the Jelly token with the template parameter equal to your script filename without the .jelly extension. For example, if the script filename is foobar.jelly, the email content would look like this ${JELLY_SCRIPT,template="foobar"}.

Extend Email-ext

 Make sure you have installed Maven 3  and JDK 5.0 or later. Make also sure you have properly configured your ~/.m2/settings.xml as explained in the [Plugin Tutorial]. This is needed to build properly any Hudson plugin.

Check out and build

How to check out the source and build:

  • git clone git://github.com/hudson-plugins/email-ext-plugin.git
  • cd email-ext-plugin
  • mvn clean install

Version History

2.11 (Comming soon)

  • Fixed issue #4927: Apply RFC822 validation on user recipients list
  • Fixed issue #8852: Change set always shows "No changes"

2.10 (Jan 20, 2011)

  • Added a new content token "FILE" that includes a file from the workspace.
  • BUILD_LOG_REGEX Token:
    • Add escapeHtml - If true, escape HTML. Defaults to false.
    • Add matchedLineHtmlStyle - If non-null, output HTML. Matched lines will become <b style="your-style-value">html escaped matched line</b>. Defaults to null.
  • Prevent duplicate email notifications. (issue #8071)

2.9 (Oct 14, 2010)

  • The showPaths argument was not working for CHANGES_SINCE_LAST_UNSTABLE and CHANGES_SINCE_LAST_SUCCESS. (issue #5486)
  • Add support for custom Jelly script content (JELLY_SCRIPT) (issue #7514)

2.8 (Sept 15, 2010)

This version requires Hudson 1.356 or newer.

  • Update BUILD_LOG_REGEX to properly handle console notes. (issue #7402)
  • Fixed password being saved in plaintext. (issue #5816)
  • Override "Hudson URL" only when "override global settings" is checked. (issue #6193)
  • Add escapeHtml parameter to BUILD_LOG content for escaping HTML. Defaults to false for backwards compatibility. (issue #7397)

2.7 (Aug 30, 2010)

  • New optional arg: ${BUILD_LOG_REGEX, regex, linesBefore, linesAfter, maxMatches, showTruncatedLines, substText} which allows substituting text for the matched regex. This is particularly useful when the text contains references to capture groups (i.e. $1, $2, etc.)
  • Fix invalid illegal email address exception (issue #7057).

2.6 (Jul 20, 2010)

  • Add ${BUILD_LOG_REGEX, regex, linesBefore, linesAfter, maxMatches, showTruncatedLines} token.
  • Add token for build cause. (issue #3166)
  • Add "changes since last unstable build" token. (issue #6671)
  • Fix issue with node properties not being available for the $ENV token. (issue #5465)
  • Recipient list can now use parameters. (issue #6396)
  • Improve docs regarding use of quotes for string parameters. (issue #5322)

2.5 (Jan 20, 2010)

  • Fix issue with adding a pre-build trigger using $BUILD_STATUS would make the build appear as if it was successful or fixed when the build hadn't actually ran yet. (issue #953)
  • Fix NullPointerException when no root URL is configured. (issue #1771)
  • $CHANGES_SINCE_LAST_SUCCESS was not showing unstable or aborted builds in the list of changes since the last successful build. (issue #3519)

2.4 (Jan 7, 2010)

  • Fix bug in 2.3 release that broke saving project config changes if Promoted Builds plugin is not also install

Labels:

plugin-notifier plugin-notifier Delete
tier3-hudson-plugin tier3-hudson-plugin Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Apr 15, 2009

    Frank says:

    How do I create a contiguous string out of tokens, if each token is delimited by...

    How do I create a contiguous string out of tokens, if each token is delimited by whitespace?

    For example, I want to have the following in my email text:

    FindBugs - http://mycompany.com/myproject/findbugsResult/

    so would like to use the following template

    FindBugs - $BUILD_URLfindbugsResult/

    as the BUILD_URL token would be substituted by

    http://mycompany.com/myproject/

    Of course, this does not work as there is no trailing whitespace after the token reference. I think it would be better to have the token references start and end with a dollar sign, so that this kind of thing is achievable.

  2. May 01, 2009

    Mohamed Osman says:

    Can you actually include the files that changed with the $CHANGES token? From w...

    Can you actually include the files that changed with the $CHANGES token?

    From what i can see in the code

    ${CHANGES, showPaths=true}

    should work, however it doesn't so i assume im doing it wrong or it's still a work in progress.

    Anyone got it to work?

  3. Jun 04, 2009

    Pramod Reddy Chinthapalli says:

    How to use build parameters as tokens? For example, I have defined PROJECT_BUI...

    How to use build parameters as tokens?

    For example, I have defined PROJECT_BUILD_NAME as build parameter When I use $PROJECT_BUILD_NAME, it does not print the value in the parameter, instead it prints parameter name.

    1. Jan 18, 2010

      Andrea Salicetti says:

      I've the same problem!

      I've the same problem!

  4. Jul 06, 2009

    Jason says:

    Anyone have any luck with, ${CHANGES, showPaths=true} Also, what is the us...

    Anyone have any luck with,

    ${CHANGES, showPaths=true}
    

    Also, what is the username and password for accessing the source code?

  5. Jul 07, 2009

    jvizueta says:

    I would also like to know how to add the files changed, I think it's a very impo...

    I would also like to know how to add the files changed, I think it's a very important feature, does anybody know how to get this done? the code mentioned doesn't work for me either, I get the same behavior than the one described by KC Baltz in the following thread http://www.nabble.com/Sending-emails-with-detailed-changes--td22252613.html

    Should I use the hpi published in the next address, or does email-ext plugin has this feature natively? http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/

  6. Oct 02, 2009

    Kfir Shay says:

    is there an email token for the list of Committers, I would like to have the use...

    is there an email token for the list of Committers, I would like to have the user name as part of the blame email subject

  7. Dec 31, 2009

    yunshan says:

    When I use Email-ext plugin to send mail, the following error come up: BUILD SUC...

    When I use Email-ext plugin to send mail, the following error come up:
    BUILD SUCCESSFUL
    Total time: 0 seconds
    Email was triggered for: Success
    There are 1 triggered emails.
    Sending email for trigger: Success
    Sending e-mails to: xxxxxxx
    ERROR: Could not send email as a part of the post-build publishers.
    com.sun.mail.smtp.SMTPSendFailedException: 454 5.7.3 Client does not have permission to submit mail to this server.
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:256)
    at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:241)
    at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:199)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:583)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:564)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:551)
    at hudson.model.Build$RunnerImpl.cleanUp(Build.java:158)
    at hudson.model.Run.run(Run.java:1221)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:122)
    Finished: SUCCESS

  8. Dec 31, 2009

    yunshan says:

    I want debug the email process, so Is there any way to put the com.sun.mail pac...

    I want debug the email process, so

    Is there any way to put the com.sun.mail package under debug traces?

  9. Jan 03, 2010

    yunshan says:

    It would be a bug with Email-ext plugin, with the same configuration, the basic ...

    It would be a bug with Email-ext plugin, with the same configuration, the basic E-mail Notification works all right, but the Email-ext works failed.

    Anyone can help?
    Thanks!

  10. Jan 07, 2010

    yunshan says:

    I followed the  "Using Groovy with Hudson to send rich text email" to ...

    I followed the  "Using Groovy with Hudson to send rich text email" to config and send mail.

    and I found when the content contains Chinese characters, it would presented as ?????,

    I have tried many time, to change configurations, but it still get better.

    Is it a bug of Email-ext when handle utf-8 characters?

  11. Jan 18, 2010

    Andrea Salicetti says:

    Same problem as the one highlighted by Pramod Reddy Chinthapalli on June 04, 200...

    Same problem as the one highlighted by Pramod Reddy Chinthapalli on June 04, 2009.

    It seems to be impossible to use build parameters as tokens - Look also at Issue 2413

    It would be very very useful, instead!

    1. Jan 19, 2010

      Mark Hughes says:

      To use build parameters as tokens, it seems the syntax is: ${ENV,var="parameter...

      To use build parameters as tokens, it seems the syntax is:

      ${ENV,var="parametername"}

      e.g., for a parameter named SRC_BUILD_BRANCH:

      ${ENV,var="SRC_BUILD_BRANCH"}

      It's just taken me a good little while to go through all the possible permutations and find the exact syntax that works!

      1. Jan 19, 2010

        Andrea Salicetti says:

        Thank you very much Mark! With your hint, I changed also the issue above an...

        Thank you very much Mark!

        With your hint, I changed also the issue above and marked as Fixed.

        1. Apr 21, 2010

          Pramod Reddy Chinthapalli says:

          Thanks Mark and Andrea.

          Thanks Mark and Andrea.

  12. Feb 17, 2010

    Mark Wolff says:

    Can this method be used in the "Recipient list" as well?  I'm not having an...

    Can this method be used in the "Recipient list" as well?  I'm not having any luck using an environment variable with this method.  I can use the same variable in the subject/content text and it works fine.  I have a tool where a user can submit "pre-checkin" code to be built, like a try server for Hudson.  So, the recipient name can change every build.  But I just can't think of a way to make that happen.

  13. Mar 02, 2010

    SPQR says:

    How do I insert newlines into the Default Content field? I've tried \n /n </p...

    How do I insert newlines into the Default Content field? I've tried \n /n </p> ?

    Thanks.

    1. Mar 02, 2010

      SPQR says:

      I figured it out. With HTML/text formatted emails, <br> works properly.

      I figured it out. With HTML/text formatted emails, <br> works properly.

  14. May 27, 2010

    Steven Nemetz says:

    Just started using this and love the features. But it is not created URLs correc...

    Just started using this and love the features. But it is not created URLs correctly.

    I have the server defined in the the hudson configuration. Other things use it fine. All the variables are correct in the environment.

    But this plugin is returning http://localhost:8080/... for all urls instead of the correct hudson server

    Using Hudson 1.353 and current plugin

    Thanks,

    Steven

    Fixed. Was config issue. Didn't realize the server had to be set in this plugin.

    1. May 28, 2010

      Bruce Wobbe says:

      I had this problem when I switched servers. My original address was something li...

      I had this problem when I switched servers. My original address was something like this server2.myco.com. I then moved hudson from that server by copying the hold hudson directory over to the new server which was server.myco.com. I then went into the hudson config and changed the server. However each email still had the old server address. I double and triple verified I made the change and restarted hudson, all kinds of things, still the wrong address. Finally I grep'ed for the wrong address and found it in the email-ext config file and changed it there. It then worked. I suspect it reads this address when the plugin is installed , then never again, so if you change the hudson server address , it never recognizes the change and never updates it's config.

      Hope this helps

  15. Apr 22, 2010

    Deepak Chavan says:

    i am unable to get mails from hudson, got below error ----------- Email...

    i am unable to get mails from hudson, got below error -----------

    Email was triggered for: Failure

    Sending email for trigger: Failure

    Failed to create e-mail address for Sending email to: buildmaster@ebix.com devteam@premiertechnologygroup.com

    ERROR: Could not send email as a part of the post-build publishers.

    javax.mail.SendFailedException: Invalid Addresses;

    nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)

    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)

    at javax.mail.Transport.send0(Transport.java:169)

    at javax.mail.Transport.send(Transport.java:98)

    at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:234)

    at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:219)

    at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:180)

    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)

    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:582)

    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:563)

    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:550)

    at hudson.model.Build$RunnerImpl.cleanUp(Build.java:158)

    at hudson.model.Run.run(Run.java:1285)

    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)

    at hudson.model.ResourceController.execute(ResourceController.java:88)

    at hudson.model.Executor.run(Executor.java:122)

    Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay

    at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)

    ... 15 more Finished: FAILURE

    1. May 28, 2010

      Bruce Wobbe says:

      This may be a similar problem to what I had. The standard email report uses a sp...

      This may be a similar problem to what I had. The standard email report uses a space separated list. email-ext uses a comma separated list. I saw a similar error to this when I had them both set up and used the same format(Comma separated ) for both.

  16. May 28, 2010

    Johnny Kauffman says:

    I'm convinced that I've run into a rather simple bug with the email mechanisms: ...

    I'm convinced that I've run into a rather simple bug with the email mechanisms:

    I have a project where I've only configured "Success" and "Failure" every night. According to the help texts, I should never see any other types of email. However, I still get emails about "Still Failing!", which threw me off since I'd set my inbox rules to look for "Failure!". I don't believe there's a way to work around the issue.

  17. May 28, 2010

    Tracy Davis says:

    I am running Hudson 1.358 under Apache/Tomcat on Redhat 5.2 (Tikanga). &nbs...

    I am running Hudson 1.358 under Apache/Tomcat on Redhat 5.2 (Tikanga).   I have setup Email to log broken builds including:

    Upon testing email I receive:  Failed to send out email

    javax.mail.NoSuchProvider.Exception: smtp

    Sendmail does work on this box.

    Do I need to configure the /var/lib/tomcat5/.../server.xml file to include a SMTP server to correct ?

  18. May 28, 2010

    Bruce Wobbe says:

    I have this set up and working great, however the only problem I have is where d...

    I have this set up and working great, however the only problem I have is where does the plugin get the email addresses? I have one user who has no email address and I don't know where to put it in? I am using ldap with subversion.  I have email-ext set up to send out to culprits on failure. It works for the one user for which is says no email set up for user xxxx Does it use ldap or subversion to get the email address? I don't see where we have emails assigned under subversion so I am guessing ldap, however I don't know where to assign the addresses for that. If you can let me know how the plugin ddetermines email address in this scenario I'll look further, right now I haven't figured it out yet.

    1. May 28, 2010

      Steven Nemetz says:

      It uses the user names from the revision control system. I'm using perforce and ...

      It uses the user names from the revision control system. I'm using perforce and it gets the entire email addresses from it. I believe if the version control only has a user name, it takes it and tacks on the domain that you put in the plugin config

  19. Jun 09, 2010

    Tim Voet says:

    I didn't see a feature request page, or a roadmap, but i would like to request a...

    I didn't see a feature request page, or a roadmap, but i would like to request a feature, to have a token for REPOSITORY URL, we have SVN_REVISION, but i would like the url as well.

    we have jobs setup that are similar with only the SVN URL changing. i would like to automatically include the SVN url in the emails, so that people can quickly know what version has just been deployed.

  20. Jul 01, 2010

    Daniel Triphaus says:

    Hi, I would like to use Java-properties in the Mails. Is it already possible or ...

    Hi, I would like to use Java-properties in the Mails. Is it already possible or can you implement that?

    Thanks!

  21. Jul 02, 2010

    Adam A says:

    Hi, in version 2.2 there was a checkbox "this mail is a script" and "this mail i...

    Hi, in version 2.2 there was a checkbox "this mail is a script" and "this mail is html". Now there is a select with "plain text" or "text\html". Does this mean that groovy scripts in mails are no longer supported?

  22. Jul 06, 2010

    Brian Ketterer says:

    Hey, Could we get a release date, or could you make a release of 2.6. I am exci...

    Hey,

    Could we get a release date, or could you make a release of 2.6. I am excited to use the ${BUILD_LOG_REGEX feature and would like it to be available now or at least get a rough idea about when it will be available.

    Thanks

  23. Jul 23, 2010

    Shen Liu says:

    how use BUILD_LOG_REGEX to filter ant build file execute and result in build log...

    how use BUILD_LOG_REGEX to filter ant build file execute and result in build log?
    my build has several ant file, and i use this:

    ${BUILD_LOG_REGEX, regex="(?i)\b(Buildfile|BUILD|FAILED)\b", linesAfter=1}
    

    but this only generate the "[...truncated XXX lines...]" content.

    1. Jul 24, 2010

      Shen Liu says:

      i see. it is necessary to escape backslash('\'). so it is: ${BUILD_LOG_REGEX, r...

      i see. it is necessary to escape backslash('\'). so it is:

      ${BUILD_LOG_REGEX, regex="\\b(Buildfile|BUILD)\\b", linesAfter=1}
      
  24. Jul 26, 2010

    Arnaud Héritier says:

    Hi, Is it supposed to work with the LDAP plugin to retrieve emails of committe...

    Hi,

    Is it supposed to work with the LDAP plugin to retrieve emails of committers from an external LDAP ?
    http://wiki.hudson-ci.org/display/HUDSON/LDAP+Email+Plugin

    Thx?

  25. Aug 09, 2010

    jephiesu says:

    Hi,   How can I use a special file content as the email content ?&nbs...

    Hi,

      How can I use a special file content as the email content ?  Just like Ant Mail Task ,Attribute messagefile

     

    messagefile File to send as the body of the email. Property values in the file will be expanded.

     Thx !

  26. Aug 19, 2010

    Marco Chan says:

    I am trying to modify/set a environment variable within the shell script so that...

    I am trying to modify/set a environment variable within the shell script so that it will be available through the tokens by calling

    ${ENV,var="ABC"}

    How can I do this?

    Thanks!

  27. Aug 23, 2010

    James says:

    According to the version history (2.6), the following is now possible: "Recipien...

    According to the version history (2.6), the following is now possible: "Recipient list can now use parameters".

    However there no instructions as to what to enter into the "Global Recipient List" text field. I have tried using the syntax...

    ${ENV, var="EMAIL_ADDRESS_PARAM"}

    ... but this does not work. This results in the following error:

    Sending email to: ${ENV <var="EMAIL_ADDRESS_PARAM"}>
    ERROR: Could not send email as a part of the post-build publishers.
    javax.mail.SendFailedException: Invalid Addresses;
      nested exception is:
    	com.sun.mail.smtp.SMTPAddressFailedException: 501 <${ENV>: recipient address must contain a domain
    ;
      nested exception is:
    	com.sun.mail.smtp.SMTPAddressFailedException: 501 <var="EMAIL_ADDRESS_PARAM"}>: "@" or "." expected after "var="
    ;
      nested exception is:
    	com.sun.mail.smtp.SMTPAddressFailedException: 501 <var="EMAIL_ADDRESS_PARAM"}>: "@" or "." expected after "var="
    
  28. Aug 24, 2010

    Geoff Kirk says:

    I am having the same problem. Could someone provide further detail to what "Rec...

    I am having the same problem. Could someone provide further detail to what "Recipient list can now use parameters" means exactly and instruction on how to implement this enhancement?

    1. Sep 01, 2010

      Lars Brinkmann says:

      Hi I'm using it in a paremeterized build where the User has to select a "respons...

      Hi I'm using it in a paremeterized build where the User has to select a "responsible person" for the parameter VERANTWORTLICHER.

      Just adding $VERANTWORTLICHER@randomdomain.de works just fine for my builds.

      1. Sep 01, 2010

        Geoff Kirk says:

        thanks for your help on that. Seems to be working fine. Although it would be e...

        thanks for your help on that. Seems to be working fine. Although it would be excellent to be able to use a distributionlists or a set of users/groups instead of a single user. Such as 'fullBuildEmailListing = TeamA@gmail.com, TeamB@gmail.com, TeamC@gmail.com.

  29. Sep 03, 2010

    Nuno Goncalves says:

    If there's a build error, would it possible to configure hudson to binary chop b...

    If there's a build error, would it possible to configure hudson to binary chop between the P4 checkins that occurred since the previous build rather than alerting everyone that checked something in between builds? I do have commiters checked for failing and , and this causes it to email all who commited since the last failure, but since the tests take half an hour to run, im polling each hour for changes.

    The main problem is when there are back-to-back unit tests that break, I'd want to be able to make it isolate what exactly broke, and email the proper commiters intelligently.  Has someone already set something like this up?

  30. Sep 09, 2010

    Bernie Bonn says:

    I am using the HPI referenced in http://techkriti.wordpress.com/2008/08/30/using...

    I am using the HPI referenced in http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/ and it is working well.  However the actual plug in has been updated with many valuable tokens I need to make use of.   Any idea how I can update to latest Plug in and still take advantage of Groovy script?  Thanks for any info.

  31. Oct 27, 2010

    Juuso Ohtonen says:

    The feature BUILD_LOG_REGEX seems very useful. I would like to use it to parse e...

    The feature BUILD_LOG_REGEX seems very useful. I would like to use it to parse email addresses from the console output. However, it seems that BUILD_LOG_REGEX does NOT evaluate properly in the "Global Recipient List" field. Using it in other fields is working fine. I'm using version 2.9 of the plugin.

    Could you improve this feature so it could be used in the "Global Recipient List" field as well?

  32. Nov 03, 2010

    Paul Andrew says:

    As above, BUILD_LOG_REGEX works great so it would be good to have it available f...

    As above, BUILD_LOG_REGEX works great so it would be good to have it available for generating the e-mail recipients as well. Even if it was just possible to access environment variables as well as build parameters in the e-mail recipient list, it would be a real help. I'm hoping I'll get some time myself to look into trying this.

  33. Nov 12, 2010

    Laurent Delcambre says:

    Hi, 1) I would like to edit the HTML Jelly template ie. display successful tests...

    Hi,
    1) I would like to edit the HTML Jelly template ie. display successful tests. I don't know where to find the list of possible functions to use in Jelly template.
    2) I would like to display Test coverage for each tested method but the only place I coudl find test coverage in my JUnit XML report is in the <system-out>. Is that a normal Junit issue? It sounds weird as it's one of the main purpose of JUnit..
    3) How do you display <system-out> ?

    Cheers,
    Laurent

  34. Jan 04, 2011

    Matthew Ford says:

    Would like to create/update the html template and add clover and maybe some othe...

    Would like to create/update the html template and add clover and maybe some other stuff.  I see that others have posted similar statements and are requesting documentation on writing the jelly code to do this.  The existing template contains code for including junit and cobertura results, how do we add clover results to the email?  Is there documentation on accessing this information?  An earlier post asked about converting the groovy stuff (which we are currently using) to jelly to use with the new updated plugin.  The lack of responses is disconcerting.  I am not a developer, so requiring me to download source to figure out what to include in the jelly html template is not feasible. Has anyone using this new plugin added clover results to the email template?  How do we find out what data/properties can be accessed from the jelly template?

  35. Jan 07, 2011

    solganik sasha says:

    I have added Matrix build support to email ext, and i`m wondering whether you`ll...

    I have added Matrix build support to email
    ext, and i`m wondering whether you`ll be interested to add it to the
    distribution. I just dont know what is the procedure here with hudson
    plugins (how can i propose a feature).
    I needed that feature for my project, and i have seen a couple of posts
    of people that were interested with such feature, so i have implemented
    it based on 2.10-SNAPSHOT version of the plugin.
    I have added an option to send email only for parent (MatrixBuild) or
    for Configuration (MatrixRun) or both.

    http://wiki.hudson-ci.org/download/attachments/3604514/patch.txt.zip

  36. Jan 11, 2011

    Alexander U. says:

    Hello Guys, I need email plugin with files attachment support. Could you please...

    Hello Guys,

    I need email plugin with files attachment support. Could you please tell me when are you going to release 2.10 version?

    Thanks,

       Alexander

  37. Jan 25, 2011

    Pritesh Saharey says:

    The existing example jelly script of html and text link is not working does anyo...
  38. Feb 07, 2011

    Slav Dok says:

    Somebody please help me. For 2 full days i've been struggling with a simple tas...

    Somebody please help me.

    For 2 full days i've been struggling with a simple task of displaying the BUILD_LOG into an email. The problem is, when i do BUILD_LOG, it displays the log without any line breaks. I tried with escapeHtml=false and escapeHtml=true. My email is sent in "HTML (text/html) format"

    I also  tried using BUILD_LOG_REGEX to look for line terminators (\t, \n, \f, \r) and replace them with "<br>". None of them pick up anything. The only regular expression that picks up anything is:

    BUILD_LOG_REGEX,  regex="
    s", substText="\s<br>"

    But that replaces normal space with a <br> as well

    Please, someone. I just need to show the console log with line breaks in an HTML email

    Thank you

  39. Mar 10, 2011

    iWildWood says:

    Why does Token not include the "BUILD_ID", such as "2005-08-22_23-59-59" (YYYY-M...

    Why does Token not include the "BUILD_ID", such as "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss), and "Last Duration" ?

    How can I send the "BUILD_ID" and "Last Duration" ?

  40. Aug 16, 2011

    Mahendra Singh says:

    Hi, I am trying to use $ Unknown macro: {FILE, path} email token in my build m...

    Hi,
    I am trying to use $

    Unknown macro: {FILE, path}

    email token in my build mail.
    I am specifying $

    Unknown macro: {FILE="pom.xml,path="path of the file"}

    This file is present in my workspace.

    This configuration is not working.
    Please suggest how to use this token with an example.

    Thanks.

    1. Aug 16, 2011

      Mahendra Singh says:

      Hi, I am trying to use $ Unknown macro: {FILE, path} email token in my build ...

      Hi,
      I am trying to use

      $

      Unknown macro: {FILE, path}

      email token in my build mail.
      I am specifying

      $

      Unknown macro: {FILE="pom.xml,path="path of the file"}

      This file is present in my workspace.

      This configuration is not working.
      Please suggest how to use this token with an example.

      Thanks.

  41. Jan 31, 2012

    uhazhor says:

    I have server, when installed in /var/lib/hudson and running Hudson, and when I ...

    I have server, when installed in /var/lib/hudson and running Hudson, and when I have file with data - /tmp/hudson/data.log

    How send data.log by Attachments field?