New Message on dotNET User Group Hyd

send/receive sms thru WAP PPG..

Reply
  Reply to Sender   Recommend Message 5 in Discussion
From: kblob

Hi Freek,
I attached a .zip file with the previous message..am not sure,whether it has been attached properly..anyway,this is my code..
using System;

namespace com.esendex.articles.wappush
{
class Class1
{
/// <summary>
/// Entry method for the demo program.
/// Demonstrates how to use the class to construct a WAP Push message
/// and submit to an SMS Web Service for delivery to the handset.
/// </summary>
/// <param name="args"></param>
[STAThread]
static void Main(string[] args)
{
try
{
string recipient = ""; // mobile number to send the message to
string href = ""; // url of the content to be pushed
string text = "A WAP Push to the Yahoo site"; // description of the content displayed to the user

PushMessage message = new PushMessage(href, text);
HexDecoder decoder = new HexDecoder();

string body = new string(decoder.GetChars(message.GetSMSBytes()));

Console.WriteLine("SMS body");
Console.WriteLine(body);

// this body is now ready to be sent, either via
// an SMS Web Service as shown below or
// via a mobile phone on a serial port.
// Making sure the message is flagged as containing
// a User Data Header

// A free evaluation account for this service can
// be set up at https://www.esendex.com/secure/registration/evaluation.aspx

messenger.MessengerHeader header = new messenger.MessengerHeader();
header.Username = ""; // username for the SMS account
header.Password = ""; // password for the SMS account
header.Account = ""; // account reference

messenger.SendService service = new messenger.SendService();
service.MessengerHeaderValue = header;

service.SendMessage(recipient, body, messenger.MessageType.SmartMessage);
Console.WriteLine("Message sent");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Console.ReadLine();
}
}
}

View other groups in this category.


Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to