Send emails with GitHub Actions View article history Edit article

Published: , Updated:
Talks about: <a class="post-tag post-tag-email" href="/tags/email">email</a>, <a class="post-tag post-tag-github" href="/tags/github">github</a>, and <a class="post-tag post-tag-github-actions" href="/tags/github-actions">github actions</a>

The dawidd6/action-send-mail action allows to send an email in your GitHub Action.

name: <PIPELINE>
    runs-on: <RUN_ON>
      - name: Send mail
        uses: dawidd6/action-send-mail@v3
          server_address: ${{ secrets.MAIL_SERVER }}
          server_port: ${{ secrets.MAIL_PORT }}
          username: ${{ secrets.MAIL_USERNAME }}
          password: ${{ secrets.MAIL_PASSWORD }}
          subject: <SUBJECT>
          body: <BODY>
          to: ${{ secrets.MAIL_RECIPIENT }}
          from: ${{ secrets.MAIL_SENDER }}

Create appropriate secrets in your organization or project. In case you are using an organization, but different mailing lists, define MAIL_RECIPIENT for each project.