response

package
v0.0.0-...-aa54b3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClassSuccess specifies that the DSN is reporting a positive delivery
	// action.  Detail sub-codes may provide notification of
	// transformations required for delivery.
	ClassSuccess = 2
	// ClassTransientFailure - a persistent transient failure is one in which the message as
	// sent is valid, but persistence of some temporary condition has
	// caused abandonment or delay of attempts to send the message.
	// If this code accompanies a delivery failure report, sending in
	// the future may be successful.
	ClassTransientFailure = 4
	// ClassPermanentFailure - a permanent failure is one which is not likely to be resolved
	// by resending the message in the current form.  Some change to
	// the message or the destination must be made for successful
	// delivery.
	ClassPermanentFailure = 5
)
View Source
const (
	OtherStatus                             = ".0.0"
	OtherAddressStatus                      = ".1.0"
	BadDestinationMailboxAddress            = ".1.1"
	BadDestinationSystemAddress             = ".1.2"
	BadDestinationMailboxAddressSyntax      = ".1.3"
	DestinationMailboxAddressAmbiguous      = ".1.4"
	DestinationMailboxAddressValid          = ".1.5"
	MailboxHasMoved                         = ".1.6"
	BadSendersMailboxAddressSyntax          = ".1.7"
	BadSendersSystemAddress                 = ".1.8"
	OtherOrUndefinedMailboxStatus           = ".2.0"
	MailboxDisabled                         = ".2.1"
	MailboxFull                             = ".2.2"
	MessageLengthExceedsAdministrativeLimit = ".2.3"
	MailingListExpansionProblem             = ".2.4"
	OtherOrUndefinedMailSystemStatus        = ".3.0"
	MailSystemFull                          = ".3.1"
	SystemNotAcceptingNetworkMessages       = ".3.2"
	SystemNotCapableOfSelectedFeatures      = ".3.3"
	MessageTooBigForSystem                  = ".3.4"
	OtherOrUndefinedNetworkOrRoutingStatus  = ".4.0"
	NoAnswerFromHost                        = ".4.1"
	BadConnection                           = ".4.2"
	RoutingServerFailure                    = ".4.3"
	UnableToRoute                           = ".4.4"
	NetworkCongestion                       = ".4.5"
	RoutingLoopDetected                     = ".4.6"
	DeliveryTimeExpired                     = ".4.7"
	OtherOrUndefinedProtocolStatus          = ".5.0"
	InvalidCommand                          = ".5.1"
	SyntaxError                             = ".5.2"
	TooManyRecipients                       = ".5.3"
	InvalidCommandArguments                 = ".5.4"
	WrongProtocolVersion                    = ".5.5"
	OtherOrUndefinedMediaError              = ".6.0"
	MediaNotSupported                       = ".6.1"
	ConversionRequiredAndProhibited         = ".6.2"
	ConversionRequiredButNotSupported       = ".6.3"
	ConversionWithLossPerformed             = ".6.4"
	ConversionFailed                        = ".6.5"
)

DefaultMap contains defined default codes (RfC 3463)

View Source
const CRLF = "\r\n"
View Source
const SP = " "

space char

Variables

This section is empty.

Functions

func GetQuote

func GetQuote() string

GetQuote returns a random quote from The big Lebowski

Types

type EnhancedStatusCode

type EnhancedStatusCode struct {
	Class             class
	SubjectDetailCode subjectDetail
}

EnhancedStatus are the ones that look like 2.1.0

func (EnhancedStatusCode) String

func (e EnhancedStatusCode) String() string

String returns a string representation of EnhancedStatus

type Response

type Response struct {
	EnhancedCode subjectDetail
	BasicCode    int
	Class        class
	// Comment is optional
	Comment string
	// contains filtered or unexported fields
}

Response type for Stringer interface

func (*Response) String

func (r *Response) String() string

String returns a custom Response as a string

type Responses

type Responses struct {

	// The 500's
	FailLineTooLong              *Response
	FailNestedMailCmd            *Response
	FailNoSenderDataCmd          *Response
	FailNoRecipientsDataCmd      *Response
	FailUnrecognizedCmd          *Response
	FailMaxUnrecognizedCmd       *Response
	FailSyntaxError              *Response
	FailReadLimitExceededDataCmd *Response
	FailMessageSizeExceeded      *Response
	FailReadErrorDataCmd         *Response
	FailPathTooLong              *Response
	FailInvalidAddress           *Response
	FailLocalPartTooLong         *Response
	FailDomainTooLong            *Response
	FailBackendNotRunning        *Response
	FailBackendTransaction       *Response
	FailBackendTimeout           *Response
	FailRcptCmd                  *Response

	// The 400's
	ErrorTooManyRecipients *Response
	ErrorRelayDenied       *Response
	ErrorShutdown          *Response

	// The 200's
	SuccessMailCmd       *Response
	SuccessRcptCmd       *Response
	SuccessResetCmd      *Response
	SuccessVerifyCmd     *Response
	SuccessNoopCmd       *Response
	SuccessQuitCmd       *Response
	SuccessDataCmd       *Response
	SuccessStartTLSCmd   *Response
	SuccessMessageQueued *Response
}

Responses has some already pre-constructed responses

var (
	// Canned is to be read-only, except in the init() function
	Canned Responses
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL