email

package
v0.0.0-...-2015dc4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CharSet = "UTF-8"

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	FileName    string
	FileContent []byte // base64 format
	ContentType string // ex : image/jpeg, text/csv, application/pdf
}

type Mailer

type Mailer interface {
	SendRaw(Raw) (*ses.SendEmailOutput, error)
}

func New

func New(session *session.Session) Mailer

type Raw

type Raw struct {
	Sender      string
	Recipient   string
	Subject     string
	Message     string
	MessageHTML string

	Attachments []Attachment
}

func (*Raw) BuildEmail

func (r *Raw) BuildEmail() []byte

func (*Raw) SetAttachment

func (r *Raw) SetAttachment(writer *multipart.Writer)

func (*Raw) SetBody

func (r *Raw) SetBody(writer *multipart.Writer, buf *bytes.Buffer)

func (*Raw) SetBodyHTML

func (r *Raw) SetBodyHTML(writer *multipart.Writer)

func (*Raw) SetBodyText

func (r *Raw) SetBodyText(writer *multipart.Writer)

func (*Raw) SetMainHeader

func (r *Raw) SetMainHeader(writer *multipart.Writer)

Jump to

Keyboard shortcuts

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