mailer

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 1 Imported by: 1

README

go-mailer

Actions Status Go Report Card GoDoc

Implementations

Documentation

Overview

Package mailer contains interfaces to deal with mailers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	// SendStackTrace emails the current stacktrace to the default FROM
	SendStackTrace(trace []byte, message string, context map[string]string) error

	// Send is used to send an email
	Send(msg *Message) error
}

Mailer is an object used to send email

type Message

type Message struct {
	TemplateID string
	From       string
	To         string
	Subject    string
	Body       string
	Vars       map[string]string
}

Message represents a message to send

func NewMessage

func NewMessage(templateID string) *Message

NewMessage creates a new message from a template

func (*Message) SetVar

func (msg *Message) SetVar(name, value string)

SetVar set a variable to the message

Directories

Path Synopsis
implementations
mockmailer
Package mockmailer is a generated GoMock package.
Package mockmailer is a generated GoMock package.
noopmailer
Package noopmailer contains an no-op implementation of the mailer interface
Package noopmailer contains an no-op implementation of the mailer interface
printmailer
Package printmailer contains an implementation of the mailer interface that prints
Package printmailer contains an implementation of the mailer interface that prints
sendgridmailer
Package sendgridmailer contains an implementation of the mailer interface that uses sendgrid
Package sendgridmailer contains an implementation of the mailer interface that uses sendgrid

Jump to

Keyboard shortcuts

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