cmailer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package cmailer provides methods to easily send emails

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Send(ctx context.Context, p SendParams) error
}

Mailer provides methods to send emails.

func NewLogMailer

func NewLogMailer(logger clogger.Logger) Mailer

NewLogMailer creates an implementation of Mailer that logs all sends with the provided logger. Useful during dev as it requires no configuration.

type SendParams

type SendParams struct {
	From    string
	To      []string
	Subject string

	HTMLBody  *string
	PlainBody *string
}

SendParams holds data needed to send an email using Mailer.

Jump to

Keyboard shortcuts

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