mail

package
v0.0.0-...-7e594e5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(mail Mail, platform Platform) error

Types

type GuestArgs

type GuestArgs struct {
	AuthorP   string `args:"author_p"`   // 我的昵称
	Permalink string `args:"permalink"`  // 文章链接
	Author    string `args:"author"`     // 回复者昵称
	TextP     string `args:"text_p"`     // 我的评论
	Text      string `args:"text"`       // 别人回复的评论
	SiteTitle string `args:"site_title"` // 网站标题
}

type Mail

type Mail struct {
	Subject   string
	Content   string
	ToAddress string
	Typ       string // 邮件类型
}

type OwnerArgs

type OwnerArgs struct {
	Permalink string `args:"permalink"`  // 文章链接
	SiteTitle string `args:"site_title"` // 网站标题
	Author    string `args:"author"`     // 作者
	Text      string `args:"text"`       // 评论内容
	Ip        string `args:"ip"`
	Mail      string `args:"mail"`
	Time      string `args:"time"`
	Status    string `args:"status"`
}

type Platform

type Platform string
const (
	PlatformSmtp   Platform = "smtp"
	PlatformAliyun Platform = "aliyun"
)

func GetSendPlatform

func GetSendPlatform(mail Mail) Platform

GetSendPlatform get platform 通过 mail.Typ 获取发送平台

Jump to

Keyboard shortcuts

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