Documentation ¶
Index ¶
- Constants
- Variables
- func Errorf(format string, msg ...interface{}) error
- type ErrorHandler
- type Message
- type MessageHandler
- type Server
- type ServerList
- type Service
- type SmtpConf
- type SmtpServer
- func (s *SmtpServer) Close() (err error)
- func (s *SmtpServer) Init(conf ...interface{}) (err error)
- func (s *SmtpServer) Rate() time.Time
- func (s *SmtpServer) Running() bool
- func (s *SmtpServer) Send(m *Message) error
- func (s *SmtpServer) Sick() bool
- func (s *SmtpServer) Tag() string
- func (s *SmtpServer) Timeout() bool
Constants ¶
View Source
const ( ErrTimes = 3 TickStep = 20 * time.Second Unlimited = 0 )
View Source
const ( //authTypes Plain = "plain" MD5 = "cram-md5" Unencrypted = "unencrypted" //tags SMTP = "smtp" //conf Limit = 60 * 60 Step = 21 * 60 )
Variables ¶
View Source
var ( ErrNoActiveServer = errors.New("No active server.") ErrServiceWarning = errors.New("The Service does not running.") )
Functions ¶
Types ¶
type ErrorHandler ¶
type ErrorHandler func(e error)
type MessageHandler ¶
type MessageHandler func(e error)
type Server ¶
type Server interface { Init(conf ...interface{}) error Send(m *Message) error Close() error Rate() time.Time Tag() string Running() bool Timeout() bool Sick() bool }
func NewSmtpServer ¶
type ServerList ¶
type Service ¶
type Service struct { ErrHandler ErrorHandler MsgHandler MessageHandler // contains filtered or unexported fields }
func (*Service) RemoveServer ¶
type SmtpServer ¶
type SmtpServer struct {
// contains filtered or unexported fields
}
func (*SmtpServer) Close ¶
func (s *SmtpServer) Close() (err error)
func (*SmtpServer) Init ¶
func (s *SmtpServer) Init(conf ...interface{}) (err error)
func (*SmtpServer) Rate ¶
func (s *SmtpServer) Rate() time.Time
func (*SmtpServer) Running ¶
func (s *SmtpServer) Running() bool
func (*SmtpServer) Send ¶
func (s *SmtpServer) Send(m *Message) error
func (*SmtpServer) Sick ¶
func (s *SmtpServer) Sick() bool
func (*SmtpServer) Tag ¶
func (s *SmtpServer) Tag() string
func (*SmtpServer) Timeout ¶
func (s *SmtpServer) Timeout() bool
Click to show internal directories.
Click to hide internal directories.