amazonses

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonSES

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

AmazonSES struct holds necessary data to communicate with the Amazon Simple Email Service API.

func New

func New(accessKeyID, secretKey, region, senderAddress string) (*AmazonSES, error)

New returns a new instance of a AmazonSES notification service. You will need an Amazon Simple Email Service API access key and secret. See https://aws.github.io/aws-sdk-go-v2/docs/getting-started/

func (*AmazonSES) AddReceivers

func (a *AmazonSES) AddReceivers(addresses ...string)

AddReceivers takes email addresses and adds them to the internal address list. The Send method will send a given message to all those addresses.

func (AmazonSES) Send

func (a AmazonSES) Send(ctx context.Context, subject, message string) error

Send takes a message subject and a message body and sends them to all previously set chats. Message body supports html as markup language.

Jump to

Keyboard shortcuts

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