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

Function SMTPEnchCode

framework/exterrors/smtp.go:140–146  ·  view source on GitHub ↗

SMTPEnchCode is a convenience function changes the first number of the SMTP enhanced status code based on the value exterrors.IsTemporary returns for the specified error object.

(err error, code EnhancedCode)

Source from the content-addressed store, hash-verified

138// status code based on the value exterrors.IsTemporary returns for the specified
139// error object.
140func SMTPEnchCode(err error, code EnhancedCode) EnhancedCode {
141 if IsTemporary(err) {
142 code[0] = 4
143 }
144 code[0] = 5
145 return code
146}

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