我想使用邮件列表通过第三方提供商发送短信。以下是他们提供的代码示例:
<%
' This simple ASP Classic code sample is provided as a starting point. Please extend your
' actual production code to properly check the response for any error statuses that may be
' returned (as documented for the send_sms API call).
username = "your_username"
password = "your_password"
recipient = "44123123123"
message = "This is a test SMS from ASP"
postBody = "username=" & Server.URLEncode(username) & "&password=" & Server.URLEncode(password) & "&msisdn=" & recipient & "&message=" & Server.URLEncode(message)
set httpRequest = CreateObject("MSXML2.ServerXMLHTTP")
httpRequest.open "POST", "http://bulksms.2way.co.za/eapi/submission/send_sms/2/2.0", false
httpRequest.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send postBody
Response.Write (httpRequest.responseText)
%>
我不知道如何在 GAS 中做到这一点(我真的是一个业余程序员......)。从谷歌搜索看来,我需要使用“UrlFetchApp.fetch”之类的东西。任何帮助或相关链接将不胜感激。提前致谢。