rule send_sms {
select when pageview ".*"
{
twilio:sms("Wow! I'm sending a text message") with to = "1234567890"
}
}
Use the twilio:sms() function. It takes one parameter, it's a string containing the text of the sms. Also make sure you have put your twilio keys in the meta block of your application. Something like this will do the trick:
rule send_sms {
select when pageview ".*"
{
twilio:sms("Wow! I'm sending a text message") with to = "1234567890"
}
}
发布评论
评论(2)
我必须使用 Twilio 的 API 手动执行此操作。这是发送短信的规则:
I had to do this manually using Twilio's API. Here is a rule which sends an SMS:
使用 twilio:sms() 函数。它需要一个参数,它是一个包含短信文本的字符串。还要确保您已将 twilio 密钥放入应用程序的元块中。像这样的事情就可以解决问题:
Use the
twilio:sms()
function. It takes one parameter, it's a string containing the text of the sms. Also make sure you have put your twilio keys in the meta block of your application. Something like this will do the trick: