Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12421

Add pre-send step to email-ext that can modify the mail message object

      When the Email-Ext plugin is used in conjunction with the Claim plugin there is no way to configure a project's email options to only send to the one who has claimed it. This results in every person on a team receiving emails for a build they did not break, turning Jenkins emails into something annoying instead of something useful. For someone who knew the code this would be a pretty easy feature to add. And while this would be a good feature, I think a more elaborate solution that would allow Email-ext plugin users to access/modify all parts of the email message (including who the message is being sent to) would be more useful in the long run. Giving users access to all parts of the email message and the option to run a Groovy script after the email has been built, but before the email has been sent would satisfy this feature request and would make the Email-Ext plugin much more versatile.

          [JENKINS-12421] Add pre-send step to email-ext that can modify the mail message object

          terryl westerhold created issue -
          terryl westerhold made changes -
          Description Original: When the Email-Ext plugin is used in conjunction with the Claim plugin there is no way to configure a project's email options to only send to culprits when build is not claimed. For someone who knew the code this would be a pretty easy feature to add. And while this would be a good feature, I think a more elaborate solution that would allow Email-ext plugin users to access/modify all parts of the email message (including who the message is being sent to) would be more useful in the long run. Giving users access to all parts of the email message and the option to run a Groovy script after the email has been built, but before the email has been sent would satisfy this feature request and would make the Email-Ext plugin much more versatile. New: When the Email-Ext plugin is used in conjunction with the Claim plugin there is no way to configure a project's email options to only send to culprits when build is not claimed. This results in every person on a team receiving emails for a build they did not break, turning Jenkins emails into something annoying instead of something useful. For someone who knew the code this would be a pretty easy feature to add. And while this would be a good feature, I think a more elaborate solution that would allow Email-ext plugin users to access/modify all parts of the email message (including who the message is being sent to) would be more useful in the long run. Giving users access to all parts of the email message and the option to run a Groovy script after the email has been built, but before the email has been sent would satisfy this feature request and would make the Email-Ext plugin much more versatile.
          terryl westerhold made changes -
          Description Original: When the Email-Ext plugin is used in conjunction with the Claim plugin there is no way to configure a project's email options to only send to culprits when build is not claimed. This results in every person on a team receiving emails for a build they did not break, turning Jenkins emails into something annoying instead of something useful. For someone who knew the code this would be a pretty easy feature to add. And while this would be a good feature, I think a more elaborate solution that would allow Email-ext plugin users to access/modify all parts of the email message (including who the message is being sent to) would be more useful in the long run. Giving users access to all parts of the email message and the option to run a Groovy script after the email has been built, but before the email has been sent would satisfy this feature request and would make the Email-Ext plugin much more versatile. New: When the Email-Ext plugin is used in conjunction with the Claim plugin there is no way to configure a project's email options to only send to the one who has claimed it. This results in every person on a team receiving emails for a build they did not break, turning Jenkins emails into something annoying instead of something useful. For someone who knew the code this would be a pretty easy feature to add. And while this would be a good feature, I think a more elaborate solution that would allow Email-ext plugin users to access/modify all parts of the email message (including who the message is being sent to) would be more useful in the long run. Giving users access to all parts of the email message and the option to run a Groovy script after the email has been built, but before the email has been sent would satisfy this feature request and would make the Email-Ext plugin much more versatile.

          Alex Earl added a comment -

          Are you saying have a pre-send "trigger" that is passed in a Message object that can be modified before the actual sending?

          Alex Earl added a comment - Are you saying have a pre-send "trigger" that is passed in a Message object that can be modified before the actual sending?
          Alex Earl made changes -
          Assignee New: Alex Earl [ slide_o_mix ]

          terryl westerhold added a comment - - edited

          I think you hit the keyword... "pre-send". Right before the message is sent allow users to run a Groovy script that can modify the message. And just to be clear when I say "message" I mean the Java MimeMessage which contains recipient addresses, sender address, subject, body, etc.

          terryl westerhold added a comment - - edited I think you hit the keyword... "pre-send". Right before the message is sent allow users to run a Groovy script that can modify the message. And just to be clear when I say "message" I mean the Java MimeMessage which contains recipient addresses, sender address, subject, body, etc.
          Alex Earl made changes -
          Summary Original: Build failure emails are continually sent to all culprits even if one culprit has already claimed the build New: Add pre-send step to email-ext that can modify the mail message object
          Alex Earl made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Alex Earl added a comment -

          Would you want this only at the project level?

          Alex Earl added a comment - Would you want this only at the project level?

          Yes, that is what I was thinking. I am curious to know how you are thinking you will approach this issue though. Having a feature that specifically addressed the claim issue would be great, but I really think the "more elaborate solution" I mentioned in my initial post would be much more beneficial. Giving the option to run a "pre-send" script after the message was fully built would give me the ability to fix this issue, and the potential to do many other things with the MimeMessage before it was sent.

          terryl westerhold added a comment - Yes, that is what I was thinking. I am curious to know how you are thinking you will approach this issue though. Having a feature that specifically addressed the claim issue would be great, but I really think the "more elaborate solution" I mentioned in my initial post would be much more beneficial. Giving the option to run a "pre-send" script after the message was fully built would give me the ability to fix this issue, and the potential to do many other things with the MimeMessage before it was sent.

            slide_o_mix Alex Earl
            terrylwesterhold terryl westerhold
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: