refactor smtp

This commit is contained in:
Aine
2022-11-10 13:26:12 +02:00
parent e6722dd5e8
commit 307aca7f23
11 changed files with 395 additions and 376 deletions

View File

@@ -365,7 +365,7 @@ func (b *Bot) runSend(ctx context.Context) {
data := utils.
NewEmail(ID, "", subject, from, to, body, "", nil).
Compose(b.getBotSettings().DKIMPrivateKey())
err = b.mta.Send(from, to, data)
err = b.sendmail(from, to, data)
if err != nil {
b.Error(ctx, evt.RoomID, "cannot send email to %s: %v", to, err)
} else {