以是我就只能用阿里云官方的短信接口。
论坛里也有好几个这样的代码案例,但是都不全,要自己思考修正,我这里整理完万能用的。

1添加dll引用

dll下载链接:https://pan.baidu.com/s/1dbUc7T-XbJGHyNZF2b9gYQ提取码:rbhn

引用阿里云短信供应的net2.0版本的dll接口文件

aliyundysmsphpsdk狐表Foxtable发送阿里云短信教程 应用阿里云官方sdk发送 NoSQL

2阿里注册好 署名+模板

去阿里云的官网,注册账号,开通短信模块,得到短信署名和短信模板名称。
这个自行摸索,我不教你,这个不难的。
如果连这个你都摸索不会,你别研究短信接口了。

3发送代码如下

Dim product As String = "Dysmsapi" '无需变动,官方名称Dim domain As String = "dysmsapi.aliyuncs.com" '无需变动,官方名称Dim accessId As String = "xxx" '改换为您的AccessKeyDim accessSecret As String = "xxx" '改换为您的AccessSecretDim regionIdForPop As String = "cn-hangzhou" '无需变动,官方名称Dim profile As Aliyun.Acs.Core.Profile.IClientProfile = Aliyun.Acs.Core.Profile.DefaultProfile.GetProfile(regionIdForPop, accessId, accessSecret)Aliyun.Acs.Core.Profile.DefaultProfile.AddEndpoint(regionIdForPop, regionIdForPop, product, domain)Dim acsClient As Aliyun.Acs.Core.IAcsClient = New Aliyun.Acs.Core.DefaultAcsClient(profile)Dim request As Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsRequest = New Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsRequest()Dim response As Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsResponse = NothingTry request.PhoneNumbers = "13827126079" request.SignName = "迈宝伦科技" '改换为您备案的短信署名 request.TemplateCode = "SNS_1234343245" '改换您备案的短信模板 request.TemplateParam = "{""customer"":""123""}" '如果您有可更换的标签,可以设置设置json,也可以注释掉 'request.OutId = "YourID" '这玩意暂时没用 response = acsClient.GetAcsResponse(request) MessageBox.show(response.Message) '这里输出发送结果."OK"便是行了.Catch ex As Exception MessageBox.show("短信代码有问题,请联系技能员")End TryCOPY4第三方短信

如果你真的只是发验证码类短信,不是发广告短信,那你用下面的方法https://market.aliyun.com/products/56928004/cmapi027240.html?spm=5176.730005.productlist.d_cmapi027240.xy5oIm#sku=yuncode2124000000

参考帮助文档:http://www.foxtable.com/mobilehelp/index.htm?page=0246.htm

只须要买了往后,改掉AppCode就搞定了,超级大略啊

Dim hc As New HttpClient("http://feginesms.market.alicloudapi.com/codeNotice?param=123456&phone=17703940712&sign=1&skin=1")hc.Headers.Add("Authorization","APPCODE " & "xxx请改自己xxx")Dim jo As JObject = Jobject.Parse(hc.GetData)Output.Show(jo.ToString)