Asp.net uses Web service to send text messages to mobile phones

Source: Internet
Author: User

I. Introduction:
Add a web reference provided by Sina:Http://smsinter.sina.com.cn/ws/smswebservice0101.wsdl

This service provides a method for Sending Short Messages "sendxml ". The syntax format of this method is as follows:

String sendxml (carrier, userid, password, mobilenumber, content, msgtype)

The six parameters in the sendxml method are of the string type, and the return value of the sendxml method is also of the string type.

The following describes the six parameters in the sendxml method:

· Carrier: Carrier name. This parameter has no specific requirements when used. You can enter this parameter at will, and the entered string will not be displayed on the recipient's mobile phone.

· Userid: the mobile phone number registered on Sina.// SendYou can obtain userid and password from PW to 8888.

· Password: the password provided by Sina after you successfully register your mobile phone on Sina.

· Mobilenumber: the mobile phone number of the recipient.

· Content: content of the short message to be sent.

· Msgtype: the type of Short Message sent.// The message is not a MMS Message, So enter "text ".

Ii. Background keyCode:

private void button#click (Object sender, system. eventargs e)
{< br> cannot message.cn.com. sina. smsinter. smsws Ws = new shortmessage.cn.com. sina. smsinter. smsws (); // here, the publish message is the project name
string result = ws. sendxml ("Sina", textbox1.text, textbox2.text, textbox3.text, textbox4.text, "text");
This. label1.text = result; /// return the sending result
}

3.
I would like to remind you that using this short message is not a free lunch, for more information about the fee standard, see the description on the Sina wireless website. For each fee you send, you will receive a fee from the phone number registered with sina.
. When using the method described in this article to send short messages, there is usually a delay after sending is completed. This is because the backend uses the message queue mechanism, but this delay generally takes only a few seconds.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.