Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxMessageSize = 32 << 20 // 32 mb // smtp CommandHelo = "HELO" CommandMail = "MAIL" CommandRcpt = "RCPT" CommandData = "DATA" CommandRset = "RSET" CommandSend = "SEND" CommandSoml = "SOML" CommandSaml = "SAML" CommandVrfy = "VRFY" CommandExpn = "EXPN" CommandHelp = "HELP" CommandNoop = "NOOP" CommandQuit = "QUIT" CommandTurn = "TURN" // esmtp CommandEhlo = "EHLO" Command8bitmime = "8BITMIME" CommandAtrn = "ATRN" CommandAuth = "AUTH" CommandChunking = "CHUNKING" CommandDsn = "DSN" CommandEtrn = "ETRN" CommandPipelining = "PIPELINING" CommandSize = "SIZE" CommandStarttls = "STARTTLS" CommandSmtputf8 = "SMTPUTF8" )
Variables ¶
View Source
var ( BadSyntaxError = errors.New("bad syntax error") MessageSizeError = errors.New("max message size exceeded") )
View Source
var (
AlreadyRunningError = errors.New("helo already running")
)
Functions ¶
This section is empty.
Types ¶
type Reply ¶
type Reply int
const ( ReplySystemReply Reply = 211 ReplyHelpMessage Reply = 214 ReplyServiceReady Reply = 220 ReplyServiceClosingTransmissionChannel Reply = 221 ReplyOk Reply = 250 ReplyUserNotLocalWillForwardTo Reply = 251 ReplyStartMailInputEndWith Reply = 354 ReplyServiceNotAvailable Reply = 421 ReplyRequestedActionAbortedInProcessing Reply = 451 ReplyRequestedActionNotTakenInsufficientSystemStorage Reply = 452 ReplySyntaxErrorCommandUnrecognized Reply = 500 ReplySyntaxErrorInParametersOrArguments Reply = 501 ReplyCommandNotImplemented Reply = 502 ReplyBadSequenceOfCommands Reply = 503 ReplyCommandParameterNotImplemented Reply = 504 ReplyUserNotLocalPleaseTry Reply = 551 ReplyRequestedMailActionAbortedExceededStorageAllocation Reply = 552 ReplyRequestedActionNotTakenMailboxNameNotAllowed Reply = 553 ReplyTransactionFailed Reply = 554 )
type SmtpServer ¶
type SmtpServer struct {
// contains filtered or unexported fields
}
func NewSmtpServer ¶
func NewSmtpServer(host string) *SmtpServer
func (*SmtpServer) SetLogger ¶
func (s *SmtpServer) SetLogger(logger *log.Logger)
func (*SmtpServer) Start ¶
func (s *SmtpServer) Start() error
func (*SmtpServer) Stop ¶
func (s *SmtpServer) Stop()
type SmtpsServer ¶
type SmtpsServer struct { *SmtpServer // contains filtered or unexported fields }
func NewSmtpsServer ¶
func NewSmtpsServer(host, cert, key string) *SmtpsServer
func (*SmtpsServer) Start ¶
func (s *SmtpsServer) Start() error
type Writer ¶
func (*Writer) WriteContinuedReply ¶
func (*Writer) WriteReply ¶
func (*Writer) WriteReplyCode ¶
Click to show internal directories.
Click to hide internal directories.