You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
James 3e397a6f66 update maild base 3 months ago
LICENSE first commit 4 years ago
README.md maild 6 months ago
context.go 更新 'context.go' 3 months ago
example_smtpd_test.go update maild base 3 months ago
go.mod update maild base 3 months ago
go.sum update maild base 3 months ago
smtd.go 更新 'smtd.go' 3 months ago
smtp.go 更新 'smtp.go' 3 months ago

README.md

smtpd

smtp server

使用者需实现SmtpServerConfigure接口

type SmtpServerConfigure interface {
    GetConfig() *lib.ServerConfig
    func (this *SmtpConf) Auth(username string, password string) string
    func TakeOff(email *smtpd.Mail)
}

准备妥当后只需构建一个 smtpd 实例并监听即可

smtpServer := smtpd.New(&SmtpConf {})

ln, err := smtpd.Socket(":10025")
if nil != err {
    log.Println(err)
}
smtpServer.Listen(ln)