从 Rails 应用程序发送免费短信 [英] send free sms from rails app

查看:74
本文介绍了从 Rails 应用程序发送免费短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 rails 应用程序向美国号码发送免费短信.

How can i send free sms to US numbers from a rails app.

sms_fu 是否在使用 rails 3?

Is sms_fu working with rails 3?

它对我不起作用:--安装 gem 后.

Its not working for me :-- After installing the gem.

步骤:-在我的环境文件中指定了这个

Steps:- Specified this in my environment file

 1. sms_fu = SMSFu::Client.configure(:delivery => :action_mailer)

然后

2.sms_fu.deliver("5558675309","at&t","message") is not working

推荐答案

从文档中,我可以看到这不适用于所有提供商(我来自欧洲).所以对我来说这不是一个可行的解决方案,尽管它看起来很有趣.

From the documentation, i can see this does not work for all providers (i am from Europe). So for me this is not a viable solution, although it seems very interesting.

为了测试它,我会推荐以下内容.

To test it, i would recommend the following.

  • 将 gem 添加到您的 Gemfile:gem "sms_fu"
  • 启动 rails 控制台 (rails c)
  • 在控制台内输入您输入的两行,看看会发生什么

在您的 Rails 应用程序中,我将在初始化程序中创建 sms_fu 变量(config/initializers 文件夹中的文件,然后在任何控制器操作中,您可以只做sms_fu.deliver(...).

Inside your Rails-app, I would create the sms_fu variable inside an initializer (a file inside the config/initializers folder, and then inside any controller action, you can just do sms_fu.deliver(...).

我们使用来自 ClickatellTyntec.

We use the paying sms-services from Clickatell and Tyntec.

这篇关于从 Rails 应用程序发送免费短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆