Documentation
¶
Overview ¶
Package smtppool provides a thread-safe SMTP connection pool that reuses TCP connections via the RSET command for efficient bulk email validation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
HeloDomain string
MailFrom string
ConnectTimeout time.Duration
CommandTimeout time.Duration
Port string
MaxConnsPerHost int // max idle connections per MX host (default: 3)
MaxUsesPerConn int // max RCPT checks per connection before reconnect (default: 100)
MaxConnAge time.Duration // max lifetime of a connection (default: 5m)
// Dial is injectable for testing. Defaults to net.DialTimeout.
Dial func(network, address string, timeout time.Duration) (net.Conn, error)
}
Config configures the SMTP connection pool.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages SMTP connections per MX host.
Click to show internal directories.
Click to hide internal directories.