email

package module
v0.0.0-...-f56fe4d Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAWSSession

func CreateAWSSession(creds Credentials) (*session.Session, error)

func SendAWSSESEmail

func SendAWSSESEmail(sess *session.Session, data *EmailData) (bool, error)

Types

type Credentials

type Credentials struct {
	Region          string
	AccessKeyId     string
	SecretAccessKey string
	Token           string
}

type EmailData

type EmailData struct {
	// title of email
	Title string

	// sender's email address
	Sender string

	// Receiver's email address
	Receiver string

	// Email charset
	Charset string

	// Embeded template
	TemplateFs embed.FS

	// Tempalte patterns from embed like templates/*.html
	TemplatePatterns string

	// Email template name without path
	TemplateName string

	// Attachment bytes if any
	FileBytes *bytes.Buffer

	// Attachment file name.
	// It should be with extension
	FileName string

	// Data for email body
	Input interface{}
}

Jump to

Keyboard shortcuts

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