ses

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

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
	// contains filtered or unexported fields
}

Client contains the AWS configuration and methods

func NewClient

func NewClient(ctx context.Context, region, accessKey, secretKey string, opts ...ClientOption) (*Client, error)

NewClient creates and returns a new AWS Client from configuration

func (*Client) SendEmail

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

SendEmail delivery an email utilizing the AWS SES service

func (*Client) SendEmailWithAttachment

func (c *Client) SendEmailWithAttachment(ctx context.Context, 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(ctx context.Context, phoneNumber string, message string) (string, error)

SendSMS Send SMS using AWS SNS

type ClientOption

type ClientOption func(*Client)

ClientOption defines function type for client options

func WithEmailSender

func WithEmailSender(emailSender string) ClientOption

WithEmailSender sets the email sender

func WithPushNotificationARN

func WithPushNotificationARN(arn string) ClientOption

WithPushNotificationARN sets the push notification ARN

func WithRefreshTTL

func WithRefreshTTL(ttl int64) ClientOption

WithRefreshTTL sets a custom refresh TTL in seconds

func WithSenderName

func WithSenderName(senderName string) ClientOption

WithSenderName sets the sender name

func WithSessionTTL

func WithSessionTTL(ttl int64) ClientOption

WithSessionTTL sets a custom session TTL in seconds

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