Files
smtp/sender.go
T

13 lines
483 B
Go
Raw Permalink Normal View History

package smtp
import "context"
// Sender is the interface consumed by application services. Implementations
// include the real SMTP client and a no-op client used when Host is empty.
// Satisfied by [Component] — pass the result of [New] wherever a Sender is expected.
type Sender interface {
// Send delivers msg via SMTP. Returns nil on success or a typed [xerrors] error
// on failure. In no-op mode, Send always returns nil.
Send(ctx context.Context, msg Message) error
}