MailHog/mailhog/smtp/protocol/state.go

29 lines
504 B
Go
Raw Normal View History

2014-11-22 19:15:50 +00:00
package protocol
2014-11-22 19:05:21 +00:00
// State represents the state of an SMTP conversation
type State int
// SMTP message conversation states
const (
INVALID = State(-1)
ESTABLISH = State(iota)
AUTH
AUTHLOGIN
MAIL
RCPT
DATA
DONE
)
// StateMap provides string representations of SMTP conversation states
var StateMap = map[State]string{
INVALID: "INVALID",
ESTABLISH: "ESTABLISH",
AUTH: "AUTH",
AUTHLOGIN: "AUTHLOGIN",
MAIL: "MAIL",
RCPT: "RCPT",
DATA: "DATA",
DONE: "DONE",
}