resend

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package resend is for sending emails via the resend api

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFailedToSendEmail is returned when an email fails to send
	ErrFailedToSendEmail = errors.New("failed to send email")
	// ErrMissingAPIKey is returned when an API key is missing
	ErrMissingAPIKey = errors.New("missing API key")
)

Functions

func New added in v0.1.1

func New(apiKey string, options ...Option) (newman.EmailSender, error)

New is a function that creates a new resend EmailSender instance.

Types

type Option added in v0.1.1

type Option func(*resendEmailSender)

Option is a type representing a function that modifies a ResendEmailSender

func WithAPIKey

func WithAPIKey(apiKey string) Option

WithAPIKey is an option that allows to set a custom API key for the Resend client

func WithBaseURL

func WithBaseURL(baseURL url.URL) Option

WithBaseURL is an option that allows to set a custom base URL for the Resend client

func WithClient

func WithClient(client *resend.Client) Option

WithClient is an option that allows to set a custom Resend client

func WithDevMode added in v0.1.1

func WithDevMode(path string) Option

func WithFilepath

func WithFilepath(filepath string) Option

WithFilePath is an option that allows to set a custom file path for the Resend client

func WithHeaders

func WithHeaders(headers map[string]string) Option

WithHeaders is an option that allows to set a custom headers for the Resend client

func WithUserAgent

func WithUserAgent(userAgent string) Option

WithUserAgent is an option that allows to set a custom user agent for the Resend client

Jump to

Keyboard shortcuts

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