Versions in this module Expand all Collapse all v0 v0.1.2 Feb 18, 2023 Changes in this version + var ErrServerClosed = errors.New("smtp: Server closed") + type Envelope struct + Data []byte + Recipients []string + Sender string + func (env *Envelope) AddReceivedLine(peer Peer, addrFor string) + type Error struct + Code int + Message string + func (e Error) Error() string + type Peer struct + Addr net.Addr + HeloName string + Password string + Protocol Protocol + ServerName string + TLS *tls.ConnectionState + Username string + type Protocol string + const ESMTP + const LMTP + const SMTP + type Server struct + Authenticator func(peer Peer, username, password string) error + ConnectionChecker func(peer Peer) error + DataTimeout time.Duration + EnableProxyProtocol bool + EnableXCLIENT bool + ForceTLS bool + Handler func(peer Peer, env Envelope) error + HeloChecker func(peer Peer, name string) error + Hostname string + MaxConnections int + MaxMessageSize int + MaxRecipients int + ProtocolLogger *log.Logger + ReadTimeout time.Duration + RecipientChecker func(peer Peer, addr string) error + SenderChecker func(peer Peer, addr string) error + TLSConfig *tls.Config + WelcomeMessage string + WriteTimeout time.Duration + func (srv *Server) Address() net.Addr + func (srv *Server) ListenAndServe(addr string) error + func (srv *Server) Serve(l net.Listener) error + func (srv *Server) Shutdown(wait bool) error + func (srv *Server) Wait() error