Very early NOTIFY support, hopefully fix -password on Windows

This commit is contained in:
Neil Alexander
2021-07-10 11:42:55 +01:00
parent 4c07013a13
commit 63de5e81e4
8 changed files with 141 additions and 31 deletions

View File

@@ -2,17 +2,20 @@ package smtpserver
import (
"github.com/emersion/go-smtp"
"github.com/neilalexander/yggmail/internal/imapserver"
)
type SMTPServer struct {
server *smtp.Server
backend smtp.Backend
notify *imapserver.IMAPNotify
}
func NewSMTPServer(backend smtp.Backend) *SMTPServer {
func NewSMTPServer(backend smtp.Backend, notify *imapserver.IMAPNotify) *SMTPServer {
s := &SMTPServer{
server: smtp.NewServer(backend),
backend: backend,
notify: notify,
}
return s
}