MCPcopy Create free account
hub / github.com/foxcpp/maddy / SMTPCode

Function SMTPCode

framework/exterrors/smtp.go:130–135  ·  view source on GitHub ↗

SMTPCode is a convenience function that returns one of its arguments depending on the result of exterrors.IsTemporary for the specified error object.

(err error, temporaryCode, permanentCode int)

Source from the content-addressed store, hash-verified

128// depending on the result of exterrors.IsTemporary for the specified error
129// object.
130func SMTPCode(err error, temporaryCode, permanentCode int) int {
131 if IsTemporary(err) {
132 return temporaryCode
133 }
134 return permanentCode
135}
136
137// SMTPEnchCode is a convenience function changes the first number of the SMTP enhanced
138// status code based on the value exterrors.IsTemporary returns for the specified

Callers 4

wrapClientErrMethod · 0.92
checkListsMethod · 0.92
requireMatchingRDNSFunction · 0.92
requireMXRecordFunction · 0.92

Calls 1

IsTemporaryFunction · 0.85

Tested by

no test coverage detected