예제 #1
0
        public static SMSSubmit ReplacebleMessage(string text)
        {
            TextMessage textMessage = new TextMessage();
            textMessage.Text = text;

            SMSSubmit sms = new SMSSubmit();
            sms.MessageToSend = textMessage;

            sms.ProtocolIdentifier = new ProtocoldentifierBuilder(ShortMessageType.ReplaceMessageType1).ToByte();

            return sms;
        }
예제 #2
0
        public static SMSSubmit FlashMessage()
        {
            TextMessage textMessage = new TextMessage();
            textMessage.DataEncoding = DataEncoding.Default7bit;
            textMessage.Text = "Flash message from SharpSMS!";

            SMSSubmit sms = new SMSSubmit();
            sms.MessageToSend = textMessage;
            sms.Indication.Class = MessageClass.ImmediateDisplay;

            return sms;
        }
예제 #3
0
        public static SMSSubmit PlainText()
        {
            TextMessage textMessage = new TextMessage();
            textMessage.DataEncoding = DataEncoding.Default7bit;
            textMessage.Text = "Hello World from SharpSMS!";

            SMSSubmit sms = new SMSSubmit();
            sms.MessageToSend = textMessage;

            // SMS center will retry the delivery for 5 days
            sms.ValidityPeriod = new TimeSpan(5, 0, 0, 0);

            return sms;
        }
예제 #4
0
        public static SMSSubmit ActivateVoicemailIndication()
        {
            TextMessage textMessage = new TextMessage();
            textMessage.Text = "You have a voicemail.";

            SMSSubmit sms = new SMSSubmit();
            sms.MessageToSend = textMessage;

            sms.Indication.Operation = MessageIndicationOperation.Discard;
            sms.Indication.Type = IndicationType.Voicemail;
            sms.Indication.IsActive = true;

            return sms;
        }