Alerting: Add EmbeddedContents as alternative embedding in smtp (#99937)

Adds support for embedding []byte in SmtpClient instead of filenames. This is backwards compatible as it uses a new field EmbeddedContents to add an alternative to the existing EmbeddedFiles which takes filenames.
This commit is contained in:
Matthew Jacobson
2025-02-05 11:12:30 -05:00
committed by GitHub
parent 0ca1febb77
commit a93664ff3d
6 changed files with 77 additions and 35 deletions
+10 -9
View File
@@ -18,15 +18,16 @@ type SendEmailAttachFile struct {
// SendEmailCommand is the command for sending emails
type SendEmailCommand struct {
To []string
SingleEmail bool
Template string
Subject string
Data map[string]any
Info string
ReplyTo []string
EmbeddedFiles []string
AttachedFiles []*SendEmailAttachFile
To []string
SingleEmail bool
Template string
Subject string
Data map[string]any
Info string
ReplyTo []string
EmbeddedFiles []string
EmbeddedContents []EmbeddedContent
AttachedFiles []*SendEmailAttachFile
}
// SendEmailCommandSync is the command for sending emails synchronously