Documentation
¶
Overview ¶
Package check contains the internal validation levels for emailkit. Each type implements the checker interface defined in validator.go. These types can be used directly, but the recommended approach is to use the fluent builder API from the github.com/optimode/emailkit package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSChecker ¶
type DNSChecker struct {
// contains filtered or unexported fields
}
DNSChecker verifies the existence of MX records.
func NewDNSChecker ¶
func NewDNSChecker(cfg DNSConfig) *DNSChecker
func NewDNSCheckerWithLookup ¶
NewDNSCheckerWithLookup is a test-oriented constructor that overrides the MX lookup function.
func (*DNSChecker) Check ¶
func (c *DNSChecker) Check(ctx context.Context, email parse.Email) types.CheckResult
type DomainChecker ¶
type DomainChecker struct {
// contains filtered or unexported fields
}
DomainChecker detects disposable domains and typos.
func NewDomainChecker ¶
func NewDomainChecker(cfg DomainConfig) *DomainChecker
func (*DomainChecker) Check ¶
func (c *DomainChecker) Check(_ context.Context, email parse.Email) types.CheckResult
type DomainConfig ¶
DomainConfig is the domain checker configuration.
type SMTPChecker ¶
type SMTPChecker struct {
// contains filtered or unexported fields
}
SMTPChecker performs SMTP RCPT TO probes to verify email existence. It uses a shared DNS cache for MX lookups and an SMTP connection pool for efficient connection reuse via the RSET command.
func NewSMTPChecker ¶
func NewSMTPChecker(cfg SMTPConfig, cache *dnscache.Cache, pool *smtppool.Pool) *SMTPChecker
NewSMTPChecker creates an SMTP checker with a shared DNS cache and connection pool.
func (*SMTPChecker) Check ¶
func (c *SMTPChecker) Check(ctx context.Context, email parse.Email) types.CheckResult
type SMTPConfig ¶
SMTPConfig is the SMTP checker configuration.
type SyntaxChecker ¶
type SyntaxChecker struct{}
SyntaxChecker validates email syntax according to RFC 5321/5322 with RFC 6531 (SMTPUTF8) and IDNA2008 internationalization support.
func NewSyntaxChecker ¶
func NewSyntaxChecker() *SyntaxChecker
func (*SyntaxChecker) Check ¶
func (c *SyntaxChecker) Check(_ context.Context, email parse.Email) types.CheckResult