email

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: BSD-1-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	EMAIL_HOST     string // Mail server host.
	EMAIL_PORT     int    // Mail server port.
	EMAIL_USERNAME string // Mail server username.
	EMAIL_PASSWORD string // Mail server password.
	EMAIL_USE_TLS  bool   // USE_TLS
	EMAIL_USE_SSL  bool   // USE_SSL
	EMAIL_FROM     string // Mail server from address.

	TIMEOUT      time.Duration
	TLS_Config   *tls.Config
	DEFAULT_AUTH smtp.Auth

	OnSend func(e *email.Email)
	// contains filtered or unexported fields
}

func (*Manager) Addr

func (m *Manager) Addr() string

func (*Manager) Init

func (m *Manager) Init()

func (*Manager) Next

func (m *Manager) Next(fromServer []byte, more bool) ([]byte, error)

func (*Manager) Send

func (m *Manager) Send(to string, subject string, body string) error

func (*Manager) SendWithTemplate

func (m *Manager) SendWithTemplate(to string, subject string, t *template.Template, data any) error

func (*Manager) Start

func (m *Manager) Start(server *smtp.ServerInfo) (string, []byte, error)

Jump to

Keyboard shortcuts

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