sendgrid

package
v3.0.0-pre.0...-f1e8a59 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package sendgrid provides the implementation of an email sender using SendGrid.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// APIKey is the sendgrid api key.
	APIKey string `name:"api-key" description:"The sendgrid API key to use"`

	// SandboxMode enables sendgrid's sandbox mode for testing.
	SandboxMode bool `name:"sandbox" description:"Set the sendgrid sandbox mode for testing"`

	// From is the address the emails are sent from.
	From string `name:"from" description:"The address the emails are sent from"`

	// Name is the name of the sender.
	Name string `name:"name" description:"The name of the sender"`
}

Config is the type that configures the SendGrid email provider.

type SendGrid

type SendGrid struct {
	// contains filtered or unexported fields
}

SendGrid is the type that implements SendGrid as email provider.

func New

func New(logger log.Interface, config Config) *SendGrid

New creates a SendGrid email provider.

func (*SendGrid) Send

func (s *SendGrid) Send(recipient string, template templates.Template) error

Send sends an email to recipient using the provided template along with the data.

Jump to

Keyboard shortcuts

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