mailer

package
v1.0.1-0...-5011f7a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 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 Mailer

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

Mailer is a SMTP mail sender.

func DialTLS

func DialTLS(host string) (*Mailer, error)

DialTLS dials mail server.

func New

func New(conn net.Conn, host string) (*Mailer, error)

conn 必须是 tls.Conn

func (*Mailer) AddTo

func (m *Mailer) AddTo(name string, to string) error

func (*Mailer) Auth

func (m *Mailer) Auth(username string, password string) error

Auth authenticates

func (*Mailer) Quit

func (m *Mailer) Quit() error

func (*Mailer) Send

func (m *Mailer) Send(subject string, body string) error

func (*Mailer) SetFrom

func (m *Mailer) SetFrom(name string, from string) error

Jump to

Keyboard shortcuts

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