@@ -0,0 +1 @@
|
||||
- Fixed missing To: email header
|
||||
+7
-1
@@ -78,7 +78,13 @@ func getMessageBody(e fleet.Email, f fromFunc) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to obtain from address: %w", err)
|
||||
}
|
||||
msg := []byte(subject + from + mime + content + "\r\n" + string(body) + "\r\n")
|
||||
to := ""
|
||||
if len(e.To) == 1 {
|
||||
to = "To: " + e.To[0] + "\r\n"
|
||||
} else if len(e.To) > 1 {
|
||||
to = "To: undisclosed-recipients\r\n"
|
||||
}
|
||||
msg := []byte(subject + from + to + mime + content + "\r\n" + string(body) + "\r\n")
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user