Skip to content

agenticmail/send-email-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

AgenticMail — Send Email Action

Send real email from GitHub Actions workflows using AgenticMail.

Drop-in step that POSTs to your AgenticMail HTTP API. Works with a self-hosted instance (default http://127.0.0.1:3100) or any reachable AgenticMail deployment. Authenticates with a per-agent API key.

Usage

name: Notify on release
on:
  release:
    types: [published]

jobs:
  email:
    runs-on: ubuntu-latest
    steps:
      - uses: agenticmail/send-email-action@v1
        with:
          api-key: ${{ secrets.AGENTICMAIL_API_KEY }}
          api-url: https://mail.example.com   # your AgenticMail API base
          to: team@example.com
          subject: "New release: ${{ github.event.release.tag_name }}"
          text: |
            ${{ github.event.release.name }} is out.

            ${{ github.event.release.html_url }}

Inputs

Name Required Default Description
api-key yes Per-agent AgenticMail API key. Store as a repo/org secret.
api-url no http://127.0.0.1:3100 Base URL of your AgenticMail HTTP API.
to yes Recipient address(es). Comma-separated for multiple.
subject yes Email subject.
text no* Plain-text body.
html no* HTML body.
cc no CC recipient(s). Comma-separated.
bcc no BCC recipient(s). Comma-separated.
reply-to no Reply-To address.

* At least one of text or html is required.

Outputs

Name Description
message-id RFC 5322 Message-ID of the sent email (if returned).
response Raw JSON response body from AgenticMail.

Multiple recipients

- uses: agenticmail/send-email-action@v1
  with:
    api-key: ${{ secrets.AGENTICMAIL_API_KEY }}
    to: alice@example.com, bob@example.com
    cc: ops@example.com
    subject: Build green
    text: All checks passed.

HTML email

- uses: agenticmail/send-email-action@v1
  with:
    api-key: ${{ secrets.AGENTICMAIL_API_KEY }}
    to: ${{ github.event.pull_request.user.email }}
    subject: PR merged — thanks!
    html: |
      <p>Your PR <a href="${{ github.event.pull_request.html_url }}">#${{ github.event.pull_request.number }}</a> has shipped. 🎉</p>

Setting up AgenticMail

If you don't have AgenticMail running yet, see the main repo. Quick start: npx @agenticmail/cli init then npx @agenticmail/cli serve. Tunnel the API to a public host (Cloudflare/ngrok) so GitHub Actions runners can reach it, and pass that URL via api-url.

Security

  • The API key is sent as Authorization: Bearer <key>. Always store it as a GitHub secret.
  • AgenticMail runs an outbound security guard server-side (PII scanners, sensitive-content detection). Emails that trip the guard go to a human-in-the-loop approval queue and the action will exit non-zero. Use a dedicated agent key in CI so review trails stay scoped.
  • The action uses jq for JSON encoding so subjects/bodies with special characters are safely escaped. jq is preinstalled on ubuntu-latest and macos-latest runners; on windows-latest, install jq first (e.g. choco install jq).

License

MIT — see LICENSE.

About

Send real email from GitHub Actions workflows via AgenticMail

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors