email

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	MsgType string
	Body    string
}

type Email

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

func New

func New(opts ...Option) *Email

func (*Email) Init

func (e *Email) Init()

func (*Email) Provide

func (e *Email) Provide(ctx context.Context) interface{}

func (*Email) Send

func (e *Email) Send(msg *Message) error

type Message

type Message struct {
	ToAddrs []string
	Cc      []string
	Subject string
	Body    *Body
	Attach  string
}

type Option

type Option func(*Options)

func WithFrom

func WithFrom(from string) Option

func WithPort

func WithPort(port int) Option

func WithPwd

func WithPwd(pwd string) Option

func WithSMTPServer added in v1.3.13

func WithSMTPServer(smtpServer string) Option

type Options

type Options struct {
	Host string
	Port int
	From string
	Pwd  string
}

Jump to

Keyboard shortcuts

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