email

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHTMLMessage

func CreateHTMLMessage(subject, dest, fromUser, fromEmail, content string) *mail.SGMailV3

CreateHTMLMessage - creates initial email object using HTML text Note that dest parameter accepts a comma delimited list of email addresses

func CreatePlainMessage

func CreatePlainMessage(subject, dest, fromUser, fromEmail, content string) *mail.SGMailV3

CreatePlainMessage - creates initial email object using plain text Note that dest parameter accepts a comma delimited list of email addresses

func Send

func Send(m *mail.SGMailV3, key string) error

Send - launches the prepared email, using the provided sendgrid api key

Types

type EMailer

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

func NewEMailer

func NewEMailer(sgkey, fromEmail, fromUser string) *EMailer

func (*EMailer) AddAttachment added in v0.2.8

func (e *EMailer) AddAttachment(data []byte, filename string, filetype string)

AddAttachment attach a file to the email (ex "text/plain")

func (*EMailer) SendHTMLMsg

func (e *EMailer) SendHTMLMsg(subject, dest, content string) error

func (*EMailer) SendTextMsg

func (e *EMailer) SendTextMsg(subject, dest, content string) error

Jump to

Keyboard shortcuts

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