ses

package
v0.4.20 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 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 CapturedEmail

type CapturedEmail struct {
	MessageID string    `json:"MessageId"`
	From      string    `json:"From"`
	To        []string  `json:"To"`
	CC        []string  `json:"CC,omitempty"`
	BCC       []string  `json:"BCC,omitempty"`
	ReplyTo   []string  `json:"ReplyTo,omitempty"`
	Subject   string    `json:"Subject"`
	Body      emailBody `json:"Body"`
	SentAt    time.Time `json:"SentAt"`
	Raw       string    `json:"Raw,omitempty"` // populated for SendRawEmail
}

CapturedEmail represents an email that was "sent" via SES. Exposed via the /_nimbus/ses/messages endpoint.

type Service

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

Service implements the AWS SES emulator. Emails are never actually sent — they are captured in memory and exposed via a Nimbus-specific endpoint for inspection during testing.

Captured emails are available at:

GET /_nimbus/ses/messages

func New

func New(region string) *Service

func (*Service) ClearMessagesHandler

func (s *Service) ClearMessagesHandler(w http.ResponseWriter, r *http.Request)

ClearMessagesHandler clears all captured emails. Useful between tests. DELETE /_nimbus/ses/messages

func (*Service) Detect

func (s *Service) Detect(r *http.Request) bool

Detect identifies SES requests by X-Amz-Target header or Action param. SES v1 uses query-param style (Action=SendEmail). SES v2 uses X-Amz-Target: AmazonSimpleEmailService.* or path /v2/email/...

func (*Service) MessageCount

func (s *Service) MessageCount() int

MessageCount returns how many emails have been captured.

func (*Service) MessagesHandler

func (s *Service) MessagesHandler(w http.ResponseWriter, r *http.Request)

MessagesHandler serves captured emails at GET /_nimbus/ses/messages. This is not an AWS API — it's a Nimbus-specific endpoint for test inspection.

func (*Service) Name

func (s *Service) Name() string

func (*Service) Reset added in v0.4.16

func (s *Service) Reset()

Reset clears all captured messages and verified identities.

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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