Skip to content

Add EmailPlugin for email notifications (issue #89, Phase 3)#93

Merged
barreiro merged 1 commit into
Hyperfoil:mainfrom
stalep:issue_89_p3
May 21, 2026
Merged

Add EmailPlugin for email notifications (issue #89, Phase 3)#93
barreiro merged 1 commit into
Hyperfoil:mainfrom
stalep:issue_89_p3

Conversation

@stalep
Copy link
Copy Markdown
Member

@stalep stalep commented May 15, 2026

Implements email notification channel using Quarkus ReactiveMailer, following the same patterns as Horreum's EmailPlugin.

Features:

  • ReactiveMailer with configurable timeout (h5m.mail.timeout, default 15s)
  • Sends both HTML and plain text bodies (multipart)
  • Configurable subject prefix (h5m.mail.subject.prefix, default [h5m])
  • Custom subject via config: {"subject": "ALERT: {folderName}"}
  • Custom body via template with {folderName}, {nodeName}, {nodeType}, {changeCount} placeholders
  • Multiple recipients: {"to": "alice@example.com,bob@example.com"}
  • Format-aware change details: FixedThreshold shows value/bound/direction, RelativeDifference shows ratio/previous/last
  • HTML body with table of changes including fingerprint and details
  • Mock mode enabled by default for dev/test; configure SMTP via MAILER_HOST, MAILER_PORT, MAILER_FROM environment variables

Dependencies:

  • Added quarkus-mailer

Tests (14):

  • Validation: valid config, multiple recipients, null, empty, missing to field, invalid email format
  • Send: delivery, change details in body, multiple recipients, custom subject with prefix, custom template, fixed threshold formatting, relative difference formatting
  • Method identity check

Implements email notification channel using Quarkus ReactiveMailer,
following the same patterns as Horreum's EmailPlugin.

Features:
- ReactiveMailer with configurable timeout (h5m.mail.timeout, default 15s)
- Sends both HTML and plain text bodies (multipart)
- Configurable subject prefix (h5m.mail.subject.prefix, default [h5m])
- Custom subject via config: {"subject": "ALERT: {folderName}"}
- Custom body via template with {folderName}, {nodeName}, {nodeType},
  {changeCount} placeholders
- Multiple recipients: {"to": "alice@example.com,bob@example.com"}
- Format-aware change details: FixedThreshold shows value/bound/direction,
  RelativeDifference shows ratio/previous/last
- HTML body with table of changes including fingerprint and details
- Mock mode enabled by default for dev/test; configure SMTP via
  MAILER_HOST, MAILER_PORT, MAILER_FROM environment variables

Dependencies:
- Added quarkus-mailer

Tests (14):
- Validation: valid config, multiple recipients, null, empty,
  missing to field, invalid email format
- Send: delivery, change details in body, multiple recipients,
  custom subject with prefix, custom template, fixed threshold
  formatting, relative difference formatting
- Method identity check
@barreiro barreiro merged commit e111100 into Hyperfoil:main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants