smtpd

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: GPL-2.0 Imports: 10 Imported by: 0

README

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)

Documentation

Overview

Simple Mail Transfer Daemon

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service(ln net.Listener, config SmtpServerConfigure)

Types

type SmtpServerConfigure

type SmtpServerConfigure interface {
	GetConfig() *base.ServerConfig
	Auth(username string, password string) string
	TakeOff(email *base.Mail)
}

接口集合

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL