email

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountCreatedInput

type AccountCreatedInput struct {
	From           string
	ReplyTo        string
	To             string
	DisplayName    string
	ContinueURL    string
	IdempotencyKey string
}

AccountCreatedInput contains the personalized fields for a new-account email.

type Message

type Message struct {
	From           string
	To             []string
	ReplyTo        string
	Subject        string
	Text           string
	HTML           string
	IdempotencyKey string
}

Message is the provider-neutral transactional email payload used by the API.

func AccountCreatedMessage

func AccountCreatedMessage(input AccountCreatedInput) (Message, error)

AccountCreatedMessage renders the account-created transactional email.

type ResendSender

type ResendSender struct {
	// contains filtered or unexported fields
}

ResendSender sends transactional email through Resend's HTTP API.

func NewResendSender

func NewResendSender(apiKey string, timeout time.Duration, opts ...ResendSenderOption) (*ResendSender, error)

NewResendSender builds a Resend-backed transactional email sender.

func (*ResendSender) Send

func (s *ResendSender) Send(ctx context.Context, message Message) error

type ResendSenderOption

type ResendSenderOption func(*ResendSender)

ResendSenderOption customizes the Resend sender.

func WithHTTPClient

func WithHTTPClient(client *http.Client) ResendSenderOption

WithHTTPClient overrides the HTTP client.

func WithResendEndpoint

func WithResendEndpoint(endpoint string) ResendSenderOption

WithResendEndpoint points the sender at a non-default endpoint. It is used by tests.

type Sender

type Sender interface {
	Send(ctx context.Context, message Message) error
}

Sender sends one transactional email.

Jump to

Keyboard shortcuts

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