mail

package
v2.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mail provides Temporal's email utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	Send(email *mail.SGMailV3) (*rest.Response, error)
}

Mailer is a class that handles mail delivery

type Manager

type Manager struct {
	APIKey       string `json:"api_key"`
	EmailAddress string `json:"email_address"` // EmailAddress is the address from which messages will be sent from
	EmailName    string `json:"email_name"`    // EmailName is the name of the email address
	// contains filtered or unexported fields
}

Manager is our manager that handles email sending

func NewManager

func NewManager(tCfg *config.TemporalConfig, db *gorm.DB) (*Manager, error)

NewManager is used to create our mail manager, allowing us to send email

func (*Manager) BulkSend

func (mm *Manager) BulkSend(subject, content, contentType string, recipientNames, recipientEmails []string) error

BulkSend is used to handle sending a single email, to multiple recipients

func (*Manager) SendEmail

func (mm *Manager) SendEmail(subject, content, contentType, recipientName, recipientEmail string) (int, error)

SendEmail is used to send an email to temporal users

Jump to

Keyboard shortcuts

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