email

package
v1.31.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email interface {
	Send(from string, to []string, cc []string, bcc []string, subject, content string, isHtml bool) error
	SendAttachment(from string, to []string, cc []string, bcc []string, subject, content string, r io.Reader, filename string, contentType string) error
}

func NewMock

func NewMock() Email

func NewSmtpEmail

func NewSmtpEmail(address string, identity, username, password, host, sender string) Email

type Mock

type Mock struct {
}

func (Mock) Send

func (m Mock) Send(from string, to, cc, bcc []string, subject, content string, isHtml bool) error

func (Mock) SendAttachment added in v1.31.2

func (m Mock) SendAttachment(from string, to, cc, bcc []string, subject, content string, r io.Reader, filename string, contentType string) error

type SmtpEmail

type SmtpEmail struct {
	Address string
	Sender  string
	Auth    smtp.Auth
}

func (SmtpEmail) Send

func (s SmtpEmail) Send(from string, to []string, cc []string, bcc []string, subject, content string, isHtml bool) error

func (SmtpEmail) SendAttachment added in v1.31.2

func (s SmtpEmail) SendAttachment(from string, to []string, cc []string, bcc []string, subject, content string, r io.Reader, filename string, contentType string) error

Jump to

Keyboard shortcuts

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