parent
19744cb73d
commit
74f94c0f26
10
mailer.go
10
mailer.go
|
@ -129,11 +129,17 @@ func flattenHeader(msg *mail.Message, bcc string) []byte {
|
||||||
|
|
||||||
for field, value := range msg.Header {
|
for field, value := range msg.Header {
|
||||||
if field != "Bcc" {
|
if field != "Bcc" {
|
||||||
buf.WriteString(field + ": " + strings.Join(value, ", ") + "\r\n")
|
buf.WriteString(field)
|
||||||
|
buf.WriteString(": ")
|
||||||
|
buf.WriteString(strings.Join(value, ", "))
|
||||||
|
buf.WriteString("\r\n")
|
||||||
} else if bcc != "" {
|
} else if bcc != "" {
|
||||||
for _, to := range value {
|
for _, to := range value {
|
||||||
if strings.Contains(to, bcc) {
|
if strings.Contains(to, bcc) {
|
||||||
buf.WriteString(field + ": " + to + "\r\n")
|
buf.WriteString(field)
|
||||||
|
buf.WriteString(": ")
|
||||||
|
buf.WriteString(to)
|
||||||
|
buf.WriteString("\r\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue