aliyunsms

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package aliyunsms 阿里云SMS短信服务

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AccessKeyID     string
	AccessKeySecret string
	SignName        string
	TemplateCode    string
	PhoneNumbers    string
	Content         string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(accessKeyID, accessKeySecret string) (client *Client)

NewClient 初始化阿里云短信服务客户端

accessKeyID 访问ID

accessKeySecret 访问密钥

func (*Client) SendSms

func (s *Client) SendSms(phoneNumbers, signName, templateCode, templateParam string) (err error)

SendSms 发送短信 phoneNumbers 接收短信的手机号码

signName 短信签名名称

templateCode 短信模板ID

templateParam 短信模板变量对应的实际值,JSON格式

返回参数 saveURL 成功上传后保存路径

Jump to

Keyboard shortcuts

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