Documentation
¶
Overview ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrQuit = errors.New("connection closed")
)
Functions ¶
func SessionHandler ¶
Types ¶
type Data ¶
type Data struct {
// Helo is a "HELO" command data.
Helo string `json:"helo"`
// Ehlo is a "EHLO" command data.
Ehlo string `json:"ehlo"`
// MailFrom is a "MAIL FROM" command data.
MailFrom string `json:"mailFrom"`
// RcptTo is a "RCPT TO" command data.
RcptTo []string `json:"rcptTo"`
// Data is a "DATA" command data.
Data string `json:"data"`
}
Data stores args passed to the corresponding SMTP commands.
type Email ¶
type Msg ¶
type Msg struct {
// Greet is server greet message.
Greet string
// Ehlo is a first line of EHLO command response.
Ehlo string
}
Msg is used to store provided command responses.
type OnCloseFunc ¶
type Option ¶
type Option func(*options)
func NotifyStartedFunc ¶
func NotifyStartedFunc(f func()) Option
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
type StringBuilder ¶
type WhitespaceCollapsingBuilder ¶
type WhitespaceCollapsingBuilder struct {
// contains filtered or unexported fields
}
func (*WhitespaceCollapsingBuilder) String ¶
func (w *WhitespaceCollapsingBuilder) String() string
func (*WhitespaceCollapsingBuilder) WriteRune ¶
func (w *WhitespaceCollapsingBuilder) WriteRune(r rune) (int, error)
func (*WhitespaceCollapsingBuilder) WriteString ¶
func (w *WhitespaceCollapsingBuilder) WriteString(s string) (int, error)
Click to show internal directories.
Click to hide internal directories.