Documentation ¶ Index ¶ func NewClient(conn net.Conn, host string) (*smtp.Client, error) func Serve(l net.Listener, h Handler, appname, hostname string) (err error) type Handler type Server func (s *Server) Serve(l net.Listener) (err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewClient ¶ func NewClient(conn net.Conn, host string) (*smtp.Client, error) create a new smtp client wrapper function func Serve ¶ func Serve(l net.Listener, h Handler, appname, hostname string) (err error) serve smtp via a net.Listener Types ¶ type Handler ¶ type Handler func(remoteAddr net.Addr, from string, to []string, body []byte) smtp message handler type Server ¶ type Server struct { // name name of the smtp application Appname string // the hostname of the smtp server Hostname string // the handler of inbound mail Handler Handler } func (*Server) Serve ¶ func (s *Server) Serve(l net.Listener) (err error) serve creates a new smtp sesion after a network connection is established Source Files ¶ View all Source files smtp.go Click to show internal directories. Click to hide internal directories.