email

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCharSet The default character encoding for the email.
	DefaultCharSet = "UTF-8"
)

Variables

This section is empty.

Functions

func ParseFromPathTemplate

func ParseFromPathTemplate(path string, data interface{}) (string, error)

ParseFromPathTemplate embeds data into the input template from path of template file

func ParseTemplate

func ParseTemplate(name string, inputTpl string, data interface{}) (string, error)

ParseTemplate embeds data into the input template

Types

type Attachments

type Attachments struct {
	Content     []byte
	ContentType string
	Name        string
}

Attachments supporting attachments input

type Config

type Config struct {
	Sender string
	Region string
	WebURL string
}

Config represents the configuration

type Email

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

Email represents the sesutil service

func New

func New(cfg Config) *Email

New initializes SNS service with default config

func (*Email) SendEmail

func (s *Email) SendEmail(input Input) error

SendEmail sends email using SES service

func (*Email) SendRaw

func (s *Email) SendRaw(input Input, attachments []*Attachments) error

SendRaw sends raw email using SES service

type Input

type Input struct {
	From     string
	To       []string
	Bcc      []string
	Subject  string
	HTMLBody string
	TextBody string
	CharSet  string
}

Input simplifies aws-ses input

Jump to

Keyboard shortcuts

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