Debian Codegraph @

pkg/services/email/smtp/smtp_errors.go

raw
1 package smtp
2
3 import "errors"
4
5 var (
6 // ErrServerNoStartTLS is returned when STARTTLS is required but the server does not support it.
7 ErrServerNoStartTLS = errors.New("server does not support StartTLS")
8
9 // ErrFromAddressMissing is returned when the configuration URL omits [Config.FromAddress].
10 ErrFromAddressMissing = errors.New("fromAddress missing from config URL")
11
12 // ErrToAddressMissing is returned when the configuration URL omits [Config.ToAddresses].
13 ErrToAddressMissing = errors.New("toAddress missing from config URL")
14
15 // errUnencryptedConnection is returned when authentication is attempted
16 // on a non-local server without TLS.
17 errUnencryptedConnection = errors.New("unencrypted connection")
18
19 // errWrongHostName is returned when the server name does not match the expected host.
20 errWrongHostName = errors.New("wrong host name")
21
22 // errUnexpectedServerChallenge is returned when the server issues an additional
23 // challenge after the client has finished sending credentials.
24 errUnexpectedServerChallenge = errors.New("unexpected server challenge")
25
26 // errHeaderBreak is returned when a sender or recipient address contains CR or LF.
27 errHeaderBreak = errors.New("address contains CR or LF")
28 )