You can already use mailer-plugin from a flow:

      step $class: 'hudson.tasks.Mailer', recipients: '...'
      

      However this just runs the canned functionality of Jenkins build mail notification: mail is sent only for unstable/failed builds, with a predetermined subject, etc. (Use catchError to send even after an earlier step throws an error.)

      email-ext-plugin integration would add a bunch more options, but still this would be focused on picking up existing behaviors related to build status: different stability triggers, changelogs, etc.

      For some cases you would prefer to unconditionally send a message with a given subject and a given body to a given list of recipients and that is that. This is best done with a special step:

      mail to: '...', cc: '...', subject: '...', body: '...'
      

      For example, you could do this immediately before running an input step to notify a team that something is waiting.

          [JENKINS-26104] Custom Workflow step for sending mail

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-23074 [ JENKINS-23074 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "email-ext PR 97 (Web Link)" [ 11927 ]
          Tom FENNELLY made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "workflow-plugin PR 39 (Web Link)" [ 12027 ]
          Jesse Glick made changes -
          Assignee New: Tom FENNELLY [ tfennelly ]
          Tom FENNELLY made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160094 ] New: JNJira + In-Review [ 196314 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow
          Andrew Bayer made changes -
          Labels Original: pipeline workflow New: pipeline
          Marcel 'childNo͡.de' Trautwein made changes -
          Remote Link New: This issue links to "MailStep.java (Web Link)" [ 15625 ]

            tfennelly Tom FENNELLY
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: