Sending/receiving 使用 coldfusion 的短信

Sending/receiving SMS using coldfusion

使用 coldfusion 发送短信有哪些选择?我做了一些研究,但它不是一种通用语言,所以我没有找到很多。到目前为止,这是我提出的三个选项:

正在发送电子邮件至 phone#@carrier.com。我不想这样做,因为我必须知道我客户的运营商,而且我不确定我是否能够收到回复。

使用第 3 方网关,例如 Plivo。这可能是也可能不是我的最佳选择。不过,我希望避免在这个项目中产生任何长期成本。

在我的服务器上安装一个 GSM 调制解调器 - 这是我很好奇的一个。冷聚变能做到这一点吗?调制解调器之后有成本吗?它是如何工作的?

CF 已经能够通过事件网关发送 SMS 一段时间了。

https://helpx.adobe.com/coldfusion/developing-applications/using-external-resources/using-the-sms-event-gateway/configuring-an-sms-event-gateway.html

https://helpx.adobe.com/coldfusion/developing-applications/using-external-resources/using-the-sms-event-gateway/coldfusion-sms-development-tools.html

我建议使用像 Twilio 这样的服务,让您可以发送 SMS 等。借助当今的技术和基于云的服务,最好使用提供商而不是重新发明轮子。

HTH

嗯。

CF admin link 配置新网关: http:///CFIDE/administrator/eventgateway/gateways.cfm

cfm 发送短信的示例代码:

<cftry>
  <cfscript>
    VARIABLES.cellNumList ='xxxxxxxxxx'; //CellNumber list
    VARIABLES.msg = structNew();
    VARIABLES.msg.command = "submit";
    VARIABLES.msg.destAddress = VARIABLES.cellNumList;
    VARIABLES.msg.shortMessage = 'Test National 2';
    VARIABLES.msg.registeredDelivery = "0";
    VARIABLES.msg.ProtocolId = 'Version3_4';
    VARIABLES.msg.SourceAddressTon = '2';
    VARIABLES.msg.SourceAddressNpi = 'Unknown';
    VARIABLES.msg.DestinationAddress = VARIABLES.cellNumList;
    VARIABLES.msg.DestinationAddressTon = '0';
    VARIABLES.msg.DestinationAddressNpi = 'Unknown';
    VARIABLES.msg.DataCoding = 'Latin1';
    VARIABLES.result = sendGatewayMessage('GATEWAY INSTANCE ID', VARIABLES.msg);
  </cfscript>
  <cfcatch type="any" >
    <cfoutput>#CFCATCH.message#</cfoutput>
  </cfcatch>
</cftry>