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.
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.