Documentation ¶
Index ¶
- type Email
- type OptionFunc
- func WithAttr(filename string, src ...io.Reader) OptionFunc
- func WithBcc(bcc ...string) OptionFunc
- func WithBody(contentType, body string) OptionFunc
- func WithCc(cc ...string) OptionFunc
- func WithDisable(disable bool) OptionFunc
- func WithEmbed(filename string, src ...io.Reader) OptionFunc
- func WithFrom(from string) OptionFunc
- func WithSubject(s string) OptionFunc
- func WithTo(to ...string) OptionFunc
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
type OptionFunc ¶
type OptionFunc func(*options)
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
Click to show internal directories.
Click to hide internal directories.