email

package
v1.32.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 5 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 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
	Host    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