【问题标题】:Is it posible send sms by SMPP protocol from sql server?是否可以通过 SMPP 协议从 sql server 发送短信?
【发布时间】:2023-04-04 14:10:01
【问题描述】:

我想发送许多短信,它们在 sql server 表中退出。 我已经通过 c# 发送主题并使用 SMPP。 但我想直接从 sql server 发送主题,例如使用 sp 或函数。 谢谢

【问题讨论】:

    标签: sql-server smpp


    【解决方案1】:

    假设一切都在 Windows 平台上,

    • 使用 C# 和 SMPP 实现 SMS API
    • 通过执行 sp_configure 启用 xp_cmdshell
    • 安装 cURL
    • 从查询中执行 curl 命令

      DECLARE @Command varchar(1024) = 'curl http://mydotNetAPI/sms -d number=959401591181 -d "message=hello from sql server"'
      EXEC MASTER.dbo.xp_cmdshell @Command
      

    注意:http://mydotNetAPI/sms 应该是您用于中继 SMS 消息的 C# API。

    或者您应该尝试http://textbelt.com/text,这是一个免费的外发短信 API。

    例如

    $ curl -X POST http://textbelt.com/text \
       -d number=5551234567 \
       -d "message=I sent this message for free with textbelt.com"
    

    参考:https://github.com/typpo/textbelt

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-12
      • 1970-01-01
      • 2014-02-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多