sesclient

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 6 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

Overview

Package sesclient implements mailer.Client using AWS SES v2.

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 AWS SES v2. Credentials are loaded from the standard AWS provider chain (env vars, ~/.aws/credentials, EC2/ECS instance role).

func New

func New(ctx context.Context, fromAddress string) (*Client, error)

New returns a Client configured with the ambient AWS credentials. fromAddress must be a verified SES identity. region defaults to us-east-1 if AWS_REGION / AWS_DEFAULT_REGION is unset.

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.

Jump to

Keyboard shortcuts

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