cloudflare

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package cloudflare submits MIME through Cloudflare Email Service's REST API. Provider acceptance does not guarantee delivery to every envelope recipient.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HTTP      email.HTTPConfig
	AccountID string
	Token     secret.String
}

Config configures Cloudflare email HTTP transport, account, and credentials.

func (Config) Format

func (Config) Format(s fmt.State, _ rune)

Format writes a fixed label without exposing configuration.

type Driver

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

Driver submits email through the Cloudflare API.

func New

func New(config Config) (*Driver, error)

New validates configuration without I/O. AccountID is the 32-character hexadecimal Cloudflare account identifier; Token needs Email Sending access.

func (*Driver) Close

func (d *Driver) Close()

Close closes the driver's HTTP client; a nil driver is harmless.

func (Driver) Format

func (Driver) Format(s fmt.State, _ rune)

Format writes a fixed label without exposing driver credentials.

func (*Driver) Send

func (d *Driver) Send(ctx context.Context, out email.Outbound) (email.Receipt, error)

Send submits an outbound MIME message of at most 5 MiB to Cloudflare. An unconfirmed successful response returns an ambiguous failure.

Jump to

Keyboard shortcuts

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