sendgridmailer

package
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: 6 Imported by: 0

Documentation

Overview

Package sendgridmailer contains an implementation of the mailer interface that uses sendgrid

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sendgrid

type Sendgrid struct {
	APIKey               string
	DefaultFrom          string
	DefaultTo            string
	StacktraceTemplateID string
}

Sendgrid is an object used to send email through sendgrid

func New

func New(apiKey, defaultFrom, defaultTo, stacktraceUUID string) *Sendgrid

New creates and returns a new mailer using sendgrid

func (*Sendgrid) Send

func (s *Sendgrid) Send(msg *mailer.Message) error

Send is used to send an email

func (*Sendgrid) SendStackTrace

func (s *Sendgrid) SendStackTrace(trace []byte, message string, context map[string]string) error

SendStackTrace emails the current stacktrace to the default FROM

Jump to

Keyboard shortcuts

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