Ejemplo n.º 1
0
        protected void SendMessage_Click(object sender, EventArgs e)
        {
            IntelliSMS objIntelliSMS = new IntelliSMS();

            objIntelliSMS.Username = "******";
            objIntelliSMS.Password = "******";

            string phone = Convert.ToString(ToTextBox.Text);

            String MessageId = objIntelliSMS.SendMsg(phone,SMSText.Text, From.Text);

            messageid.InnerHtml = "Message Sent Succesfully";

            //MMSMessage NewMMSMessage = new MMSMessage();
            //NewMMSMessage.Subject = "MMS Message Subject";
            ////MessagePart MessagePart1 = new MessagePart();
            ////MessagePart1.SourceFilename = "C:\Image1.gif";
            ////NewMMSMessage.MessageParts.Add ( MessagePart1 );
            //MessagePart MessagePart2 = new MessagePart();
            //MessagePart2.Filename = "Text1.txt";
            //MessagePart2.Text = Text.Text;
            //NewMMSMessage.MessageParts.Add ( MessagePart2 );
            //IntelliSMS objIntelliSMS = new IntelliSMS();
            //objIntelliSMS.Username = "******";
            //objIntelliSMS.Password = "******";
            //StringCollection ToList = new StringCollection();
            //ToList.Add (To.Text);
            //SendStatusCollection SendStatusList;
            //SendStatusList = objIntelliSMS.SendMMSMessage
            //( ToList, NewMMSMessage );
        }
    //Method for sending SMS via IntelliSMS
    protected void sendSMS(string msg)
    {
        IntelliSMS objIntelliSMS = new IntelliSMS();

        objIntelliSMS.Username = "******";
        objIntelliSMS.Password = "******";
        int Balance = objIntelliSMS.GetBalance();

        String MessageId = objIntelliSMS.SendMsg
            ( "44775...", msg + "Your remaining credit is: " + Balance, "ZOYA" );
    }