mail

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Overview

Package mail defines an interface for sending mail that abstracts common functionality between all mail providers such as SendGrid or MailGun.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail interface {
	// Send sends an email to a single recipient. The to address
	// must be fully specified such as name@domain.com. The from address
	// is just a name, the domain will be filled in as per the registered
	// domain (see Domain). Fields subject, text and html are as
	// expected. Subject is required and at least one of text or
	// html must be present.
	Send(to, from, subject, text, html string) error
}

Mail sends email.

func Logger

func Logger(l log.Logger) Mail

Logger returns a Mail implementation that logs any sent messages to the given Logger.

Directories

Path Synopsis
Package sendgrid sends email using SendGrid.
Package sendgrid sends email using SendGrid.

Jump to

Keyboard shortcuts

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