ses

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment added in v1.3.23

type Attachment struct {
	Filename    string
	ContentType string
	Data        []byte
}

type Client

type Client struct {
	Region              string
	AccessKeyID         string
	SecretAccessKey     string
	EmailSender         string
	SenderName          string
	PushNotificationARN string
}

Client contains the AWS configuration and methods

func NewClient

func NewClient(region, accessKey, secretKey string) (*Client, error)

NewClient creates and returns a new AWS Client from configuration

func (*Client) SendEmail

func (c *Client) SendEmail(recipient, subject, htmlBody string) (*ses.SendEmailOutput, error)

SendEmail delivery an email utilizing the AWS SES service

func (*Client) SendEmailWithAttachment added in v1.3.23

func (c *Client) SendEmailWithAttachment(recipient, subject, htmlBody string, attachments []Attachment) (*ses.SendRawEmailOutput, error)

SendEmailWithAttachment delivers an email with attachments using AWS SES

func (*Client) SendSMS

func (c *Client) SendSMS(phoneNumber string, message string) (string, error)

SendSMS Send SMS using AWS SNS

func (*Client) SetEmailSender

func (c *Client) SetEmailSender(emailSender string)

func (*Client) SetPushNotificationARN

func (c *Client) SetPushNotificationARN(arn string)

func (*Client) SetSenderName added in v1.3.24

func (c *Client) SetSenderName(senderName string)

type Config

type Config struct {
	Region              string
	AccessKeyID         string
	EmailSender         string
	SenderName          string
	PushNotificationARN string
}

Jump to

Keyboard shortcuts

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