Skip to content

Plugin: hook-email

Sends release notifications through SMTP after a SemRel run. It can deliver version, branch, and changelog details to release managers or stakeholder mailing lists.

Terminal window
semrel plugin install @semrel/hook-email

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/hook-email:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/hook-email:latest \
--certificate-identity-regexp 'https://github.com/SemRels/hook-email/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/hook-email
args:
smtp_host: smtp.example.com
smtp_port: 587
smtp_user: '${{ env.SMTP_USER }}'
smtp_pass: '${{ env.SMTP_PASS }}'
from: 'releases@example.com'
to: 'team@example.com,ops@example.com'
subject_template: 'Release {{ .TagName }} is live'
NameRequiredDefaultDescription
SEMREL_PLUGIN_SMTP_HOSTyesSMTP server hostname.
SEMREL_PLUGIN_SMTP_PORTno587SMTP server port.
SEMREL_PLUGIN_SMTP_USERyesSMTP username.
SEMREL_PLUGIN_SMTP_PASSyesSMTP password or app password.
SEMREL_PLUGIN_FROMyesSender email address.
SEMREL_PLUGIN_TOyesComma-separated list of recipient email addresses.
SEMREL_PLUGIN_SUBJECT_TEMPLATEnoplugin-definedOptional subject template for the release email.
SEMREL_PLUGIN_TLSnotrueEnable or disable TLS for the SMTP connection.
  • SEMREL_TAG_NAME
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_BUMP
  • SEMREL_BRANCH
  • SEMREL_CHANGELOG
  • SEMREL_DRY_RUN

A successful run can send an email with a subject such as Release v1.4.0 is live and a body that includes the bump level, branch, and generated changelog.