gmail

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 5 Imported by: 0

README

gmail

golang mail

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	Subject string   `form:"subject" json:"subject"`
	To      []string `form:"to" json:"to"`
	Content string   `form:"content" json:"content"`
	IsHtml  bool     `form:"is_html" json:"is_html"` //是否HTML内容
}

================================================================================ * 邮件发送 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 * ================================================================================

type MailClient

type MailClient interface {
	Send(email *Email) error
}

================================================================================ * 邮件发送 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 * ================================================================================

func NewMailClient

func NewMailClient(config *MailConfig) MailClient

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化邮件发送客户端 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type MailConfig

type MailConfig struct {
	Host     string `form:"host" json:"host"`
	Port     int32  `form:"port" json:"port"`
	Username string `form:"username" json:"username"`
	Password string `form:"password" json:"password"`
	IsSsl    bool   `form:"is_ssl" json:"is_ssl"`
}

================================================================================ * 邮件发送 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 * ================================================================================

Jump to

Keyboard shortcuts

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