mail

package
v0.0.0-...-baa204d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mail defines an interface through which mail can be sent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Send(to string, subject string, body string) (err error)
	SendTemplate(to string, subject string, tmpl string, data interface{}) (err error)
}

A Mailer defines an interface for sending mail.

func NewMailer

func NewMailer() (m Mailer)

NewMailer creates a new mailer based on the environment mode given to it. In development mode it will return a mock mailer and in every other mode (really just production) it will return a mailgun mailer.

Directories

Path Synopsis
Package mailgun provides a Mailer interface to send mail
Package mailgun provides a Mailer interface to send mail
Package mock provides a Mailer interface to test sending mail.
Package mock provides a Mailer interface to test sending mail.

Jump to

Keyboard shortcuts

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