v0.0.634 add ReplyTo to googleapi.SendMail
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s

This commit is contained in:
2026-04-24 13:38:00 +02:00
parent f62e7499ec
commit 80cea13437
8 changed files with 23 additions and 8 deletions
+4 -1
View File
@@ -8,7 +8,7 @@ import (
)
// https://datatracker.ietf.org/doc/html/rfc2822
func encodeMimeMail(from string, recipients []string, cc []string, bcc []string, subject string, body MailBody, attachments []MailAttachment) string {
func encodeMimeMail(from string, recipients []string, cc []string, bcc []string, replyTo []string, subject string, body MailBody, attachments []MailAttachment) string {
data := make([]string, 0, 32)
@@ -22,6 +22,9 @@ func encodeMimeMail(from string, recipients []string, cc []string, bcc []string,
if len(bcc) > 0 {
data = append(data, "Bcc: "+strings.Join(langext.ArrMap(bcc, func(v string) string { return mime.QEncoding.Encode("UTF-8", v) }), ", "))
}
if len(replyTo) > 0 {
data = append(data, "Reply-To: "+strings.Join(langext.ArrMap(replyTo, func(v string) string { return mime.QEncoding.Encode("UTF-8", v) }), ", "))
}
data = append(data, "Subject: "+mime.QEncoding.Encode("UTF-8", subject))
hasInlineAttachments := langext.ArrAny(attachments, func(v MailAttachment) bool { return v.IsInline })