GODT-1205: "RCPT TO" does not contain all addressed from "CC"

This commit is contained in:
Alexander Bilyak
2021-09-06 21:13:37 +00:00
committed by Jakub Cuth
parent 91dcb2f773
commit 22d2bcc21d
11 changed files with 236 additions and 91 deletions

View File

@ -362,7 +362,8 @@ func (su *smtpUser) Send(returnPath string, to []string, messageReader io.Reader
req := pmapi.NewSendMessageReq(kr, mimeBody, plainBody, richBody, attkeys)
containsUnencryptedRecipients := false
for _, email := range to {
for _, recipient := range message.Recipients() {
email := recipient.Address
if !looksLikeEmail(email) {
return errors.New(`"` + email + `" is not a valid recipient.`)
}