resend

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthChecker

func HealthChecker(cfg Config, client *http.Client) ports.HealthChecker

HealthChecker returns a Resend health checker or nil when disabled.

Types

type Client

type Client struct {
	APIKey     string
	BaseURL    string
	HTTPClient *http.Client
}

Client implements email.Sender using the Resend API.

func New

func New(apiKey string, opts ...Option) *Client

func (*Client) Send

func (c *Client) Send(ctx context.Context, msg email.Message) (string, error)

type Config

type Config struct {
	Enabled   bool
	APIKey    string
	From      string
	ContactTo []string
	BaseURL   string
}

Config describes Resend email integration.

func LoadConfig

func LoadConfig(loader *config.Loader) Config

LoadConfig reads Resend config from environment.

type Option

type Option func(*Client)

Option customizes Client behavior.

func WithBaseURL

func WithBaseURL(url string) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL