Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusPasswordNeeded = 432 StatusMessageError = 450 StatusMessageExceedStorage = 452 StatusTempAuthFailure = 454 StatusAuthInvalid = 535 StatusAuthRequired = 530 StatusEncryptionRequired = 538 StatusServerError = 550 StatusExceedStorage = 552 )
Variables ¶
View Source
var ( ErrPasswordNeeded = Error{Code: StatusPasswordNeeded, Message: StatusString(StatusPasswordNeeded)} ErrMessageError = Error{Code: StatusMessageError, Message: StatusString(StatusMessageError)} ErrMessageExceedStorage = Error{Code: StatusMessageExceedStorage, Message: StatusString(StatusMessageExceedStorage)} ErrTempAuthFailure = Error{Code: StatusTempAuthFailure, Message: StatusString(StatusTempAuthFailure)} ErrAuthInvalid = Error{Code: StatusAuthInvalid, Message: StatusString(StatusAuthInvalid)} ErrAuthRequired = Error{Code: StatusAuthRequired, Message: StatusString(StatusAuthRequired)} ErrServerError = Error{Code: StatusServerError, Message: StatusString(StatusServerError)} ErrExceedStorage = Error{Code: StatusExceedStorage, Message: StatusString(StatusExceedStorage)} )
Functions ¶
func StatusString ¶
Types ¶
type Connection ¶
type Connection struct { Server *Server HeloName string Protocol Protocol Addr net.Addr TLS *tls.ConnectionState Envelope *Envelope Environment map[string]interface{} // contains filtered or unexported fields }
func (*Connection) Error ¶
func (c *Connection) Error(err error)
type Envelope ¶
func (*Envelope) AddReceivedLine ¶
func (e *Envelope) AddReceivedLine(c *Connection)
type Handler ¶
type Handler func(conn *Connection) error
type Server ¶
type Server struct { Hostname string WelcomeMessage string ReadTimeout time.Duration WriteTimeout time.Duration DataTimeout time.Duration MaxConnections int MaxMessageSize int MaxRecipients int // WrapperChain []Wrapper // SenderChain []Sender // RecipientChain []Recipient // DeliveryChain []Delivery OnConnection Handler OnStartTLS Handler OnMail Handler TLSConfig *tls.Config ForceTLS bool ProxyProtocol bool // contains filtered or unexported fields }
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.