0.0
No commit activity in last 3 years
No release in over 3 years
腾讯云短信服务(非官方)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 5.0
~> 10.0

Runtime

 Project Readme

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.