email

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg SMTPMessage)

func Send

func Send(msg *Message) (err error)

发送邮件

Types

type Message

type Message struct {
	Tos     []string `yaml:"tos"`
	Subject string   `yaml:"subject"`
	Content string   `yaml:"content"`
}

func NewMessage

func NewMessage(to, subject, body string) (mail *Message, err error)

初始化邮件内容

func (*Message) String

func (m *Message) String() string

打印邮件内容信息

type SMTPMessage

type SMTPMessage struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Port     int    `yaml:"port"`
}

Jump to

Keyboard shortcuts

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