v0.0.634 add ReplyTo to googleapi.SendMail
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user