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.

464 B

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)