Add html_body field for multipart email notifications

Callers can now supply a plain-text Body alongside an HTML html_body;
the SMTP sender emits multipart/alternative using both verbatim instead
of auto-stripping HTML to derive the plain-text fallback. The legacy
content_type=HTML path is preserved (deprecated) for existing callers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-06 23:59:12 -07:00
parent a35b3e6283
commit ac3ba35736
5 changed files with 42 additions and 25 deletions
+2
View File
@@ -66,6 +66,7 @@ func (h *NotifierHandler) SendNotification(ctx context.Context, req *pb.SendNoti
Priority: domain.Priority(req.Priority),
Subject: req.Subject,
Body: req.Body,
HTMLBody: req.HtmlBody,
ContentType: contentType,
Recipients: req.Recipients,
CC: req.Cc,
@@ -368,6 +369,7 @@ func convertDomainToProtoNotification(notif *domain.Notification) *pb.Notificati
Status: convertDomainToProtoStatus(notif.Status),
Subject: notif.Subject,
Body: notif.Body,
HtmlBody: notif.HTMLBody,
Recipients: notif.Recipients,
Metadata: convertInterfaceMapToString(notif.Metadata),
CreatedAt: timestamppb.New(notif.CreatedAt),