使用Dotnet Windows应用程序发送短信 [英] Send SMS using Dotnet windows application

查看:86
本文介绍了使用Dotnet Windows应用程序发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友
我正在开发一个项目vb.net Windows应用程序.现在,无论使用免费的Web服务,我都需要在我的应用程序中发送短信,但我不知道如何使用.如果您知道请回复

谢谢

Hi friends
i m developing a project vb.net windows application. now i need to send sms in my application no matter using free webservice but i dont know how to use. if you know plz reply

Thanks

推荐答案

在这里.使用此代码

http://vijaymckvn.blogspot.in/2010/01/code-for-sending-sms-from-c-using.html [ http://codeglobe.in/api/way2sms/17-way2sms-api.html? start = 2 [ ^ ]
Here it is.. Use this code

http://vijaymckvn.blogspot.in/2010/01/code-for-sending-sms-from-c-using.html[^]

Edited :

One more code sample

http://codeglobe.in/api/way2sms/17-way2sms-api.html?start=2[^]


请参阅以下代码项目示例:
使用VB.NET对SMS和EMS进行编码 [ ^ ]

将文本消息发送到来自VB.NET应用程序的手机 [ Dim login As String ="YoureIPIPIUsername"
暗淡的密码作为字符串="YourPassword"
Dim compression As String =压缩选项在这里-了解更多信息"
昏暗的身体As String =您的消息"
昏暗的邮件为System.Web.Mail.MailMessage =新的System.Web.Mail.MailMessage

mail.To = toPhoneNumber +"@ sms.ipipi.com"
mail.From =登录名+"@ ipipi.com"
mail.Subject =压缩
mail.Body =正文
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",登录)
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",密码)


System.Web.Mail.SmtpMail.SmtpServer ="ipipi.com";
System.Web.Mail.SmtpMail.Send(邮件)

注意:
此实现需要.Net Framework 1.1或更高版本.
please see this codeProject samples:
Using VB.NET to Encode SMS and EMS[^]

Send a Text Message to a Cell Phone from a VB.NET Application[^]


OR


add this VB.NET code:


Imports System.Web.Mail
.
.
.
Dim toPhoneNumber As String = "DestinationPhoneNumber";
Dim login As String = "YoureIPIPIUsername"
Dim password As String = "YourPassword"
Dim compression As String = "Compression Option goes here - find out more"
Dim body As String = "Your Message"
Dim mail As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage

mail.To = toPhoneNumber + "@sms.ipipi.com"
mail.From = login + "@ipipi.com"
mail.Subject = compression
mail.Body = body
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", login)
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password)


System.Web.Mail.SmtpMail.SmtpServer = "ipipi.com";
System.Web.Mail.SmtpMail.Send(mail)

Note:
This implementation requires .Net Framework version 1.1 or higher.


使用BulkSMS网站
只需从批量短信网站购买短信包即可.
他们会给您一个帐户.并告诉他们您需要为此使用API​​.
供应商将为您提供API代码,只需复制粘贴该代码并按照他们提供的一些说明进行操作,例如更改参数loginname,pwd,msg-string,接收方的手机号码.等
祝您编码愉快!
:)
using BulkSMS sites
just purchase a sms pack from bulk-sms sites.
they will give you an account. and also tell them you will need API for this.
the providers will give you API code just copy paste that code & follow some instruction given by them like change parameters loginname, pwd, msg-string, receiver''s mobile no. etc.
Happy Coding!
:)


这篇关于使用Dotnet Windows应用程序发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆