email

package
v0.0.0-...-3030a97 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 3 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 struct {
	// contains filtered or unexported fields
}

func NewEmail

func NewEmail(client *gomail.Dialer, opts ...OptionFunc) *Email

func (*Email) Attempt

func (e *Email) Attempt() bool

Attempt 是否可以使用

func (*Email) Start

func (e *Email) Start(ctx context.Context) error

func (*Email) String

func (e *Email) String() string

type OptionFunc

type OptionFunc func(*options)

func WithAttr

func WithAttr(filename string, src ...io.Reader) OptionFunc

WithAttr 本地附件

func WithBcc

func WithBcc(bcc ...string) OptionFunc

func WithBody

func WithBody(contentType, body string) OptionFunc

WithBody contentType, body string func WithBody(contentType, body string) OptionFunc

func WithCc

func WithCc(cc ...string) OptionFunc

func WithDisable

func WithDisable(disable bool) OptionFunc

func WithEmbed

func WithEmbed(filename string, src ...io.Reader) OptionFunc

WithEmbed 图片

eg: WithEmbed("./1.jpg") 本地图片

func WithFrom

func WithFrom(from string) OptionFunc

func WithSubject

func WithSubject(s string) OptionFunc

func WithTo

func WithTo(to ...string) OptionFunc

Jump to

Keyboard shortcuts

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