mq_mail

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendMail

func SendMail(product *rabbit.RbMqClient, to, title, body string, opts ...Option) (bool, error)

SendMail 基于路径发送邮件附件

Types

type Mail

type Mail struct {
	To         string      `json:"to"`
	Cc         string      `json:"cc"`
	Bcc        string      `json:"bcc"`
	Title      string      `json:"title"`
	Body       string      `json:"body"`
	Attachment [][2]string `json:"attachment"`
	Foreign    bool        `json:"foreign"`
}

type MailInfo

type MailInfo struct {
	Mail Mail `json:"mail"`
}

type Opt added in v0.1.10

type Opt struct {
	Cc  string
	Bcc string

	Foreign  bool
	FileInfo map[string][]byte
	// contains filtered or unexported fields
}

type Option added in v0.1.10

type Option func(opt *Opt)

func WithBcc added in v0.1.10

func WithBcc(bcc string) Option

WithBcc 密送

func WithCc added in v0.1.10

func WithCc(cc string) Option

WithCc 抄送

func WithFileInfo added in v0.1.10

func WithFileInfo(fileInfo map[string][]byte) Option

WithFileInfo 根据二进制数据发送邮件

func WithFilePath added in v0.1.10

func WithFilePath(filePath []string) Option

WithFilePath 根据路径发送附件

func WithForeign added in v0.1.10

func WithForeign(foreign bool) Option

WithForeign 签名, false 时使用对内签名

Jump to

Keyboard shortcuts

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