Skip to content

lance-ding/tencent-sms

Repository files navigation

Tencent::Sms

腾讯云短信服务(非官方)

安装

添加此行到 Gemfile:

gem 'tencent-sms'

执行:

$ bundle

或使用gem安装:

$ gem install tencent-sms

使用

配置:

Tencent::Sms.config do |c|
  c.appid = "1400244376"
  c.appkey = "7712805d222a6d4c21de054158ecc29d"
end

发送短信:

message = {
  :params => %w(参数-1 参数-2),
  :mobile => "手机号码",
  :nationcode => "国家(或地区)码",
  :tpl_id => "短信模板ID",
  :sign => "短信签名"
}

result = Tencent::Sms.sendsms(message)

License

The gem is available as open source under the terms of the MIT License.

About

腾讯云短信服务(非官方)

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published