make thread replies CC-aware and multi-domain aware

This commit is contained in:
Aine
2022-11-19 17:38:13 +02:00
parent 5fe8603506
commit 8aac16aca8
3 changed files with 44 additions and 12 deletions

View File

@@ -438,7 +438,7 @@ func (b *Bot) runSend(ctx context.Context) {
from := mailbox + "@" + domain
ID := email.MessageID(evt.ID, domain)
for _, to := range tos {
eml := email.New(ID, "", " "+ID, subject, from, to, body, htmlBody, nil)
eml := email.New(ID, "", " "+ID, subject, from, to, to, "", body, htmlBody, nil)
data := eml.Compose(b.getBotSettings().DKIMPrivateKey())
if data == "" {
b.SendError(ctx, evt.RoomID, "email body is empty")