Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultShouldRetry ¶ added in v0.115.0
DefaultShouldRetry is the default function for determining if a send should be retried
Types ¶
type Client ¶ added in v0.104.0
type Client struct {
// contains filtered or unexported fields
}
Client is an SMTP client
func NewClientFromURL ¶ added in v0.104.0
NewClientFromURL creates a client from a URL like smtp://user:pass@host:port/?from=from@example.com
type Message ¶ added in v0.104.0
type Message struct {
// contains filtered or unexported fields
}
Message is email message
func NewMessage ¶ added in v0.104.0
NewMessage creates a new message
type MockSender ¶
type MockSender struct {
// contains filtered or unexported fields
}
MockSender is a mocked sender for testing that just logs would-be commands
func NewMockSender ¶
func NewMockSender(errs ...error) *MockSender
NewMockSender creates a new mock sender
type RetryConfig ¶ added in v0.115.0
RetryConfig configures if and how retrying of connections happens
func NewFixedRetries ¶ added in v0.115.0
func NewFixedRetries(backoffs ...time.Duration) *RetryConfig
NewFixedRetries creates a new retry config with the given backoffs
func (*RetryConfig) Backoff ¶ added in v0.115.0
func (r *RetryConfig) Backoff(n int) time.Duration
Backoff gets the backoff time for the nth retry
func (*RetryConfig) MaxRetries ¶ added in v0.115.0
func (r *RetryConfig) MaxRetries() int
MaxRetries gets the maximum number of retries allowed
Click to show internal directories.
Click to hide internal directories.