submail

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PlatformSubmail 赛邮云通知平台
	PlatformSubmail = "submail"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AppID    string // 应用ID
	AppKey   string // 应用Key
	SignType string `json:",default=sha1,options=[normal,sha1,md5]"` // 签名类型(枚举 normal、sha1 和 md5)
}

App 应用配置

type Config

type Config struct {
	Sms   *App // 短信应用配置
	Email *App // 邮件应用配置
}

Config 赛邮云通知服务配置

type Submail

type Submail struct {
	// contains filtered or unexported fields
}

Submail 赛邮云通知服务

func MustNewSubmail

func MustNewSubmail(c Config, opts ...notifytypes.Option) *Submail

MustNewSubmail 新建赛邮云通知服务

func NewSubmail

func NewSubmail(c Config, opts ...notifytypes.Option) (*Submail, error)

NewSubmail 新建赛邮云通知服务

func (*Submail) Platform

func (s *Submail) Platform() string

Platform 服务平台

func (*Submail) SendEmail

func (s *Submail) SendEmail(receiver, templateID string, params ...notifytypes.Param) error

SendEmail 发送邮件

func (*Submail) SendSms

func (s *Submail) SendSms(receiver, templateID string, params ...notifytypes.Param) error

SendSms 发送短信

Jump to

Keyboard shortcuts

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