resendclient

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package resendclient implements mailer.Client using the Resend API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client sends transactional email via the Resend API. https://resend.com/docs/api-reference/emails/send-email

func New

func New(apiKey, fromAddress string) *Client

New returns a Client that sends from fromAddress using apiKey. fromAddress must be a verified sender address or domain in Resend.

func (*Client) Mail

func (c *Client) Mail(
	ctx context.Context,
	to string,
	subject string,
	body string,
	headers map[string][]string,
	typ string,
) error

Mail implements mailer.Client. The body is sent as the HTML part. headers and typ are accepted for interface compatibility but not forwarded to Resend (the API does not support arbitrary headers in the basic Send call).

Jump to

Keyboard shortcuts

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