Beispiel #1
0
        protected void MessageSendingButton_Click(object sender, EventArgs e)
        {
            var options = new SmsSendingOptions();

            options.Sender            = "+37256662995";
            options.DelayedSendTime   = DateTime.UtcNow.AddMinutes(1);
            options.DeliveryReportUri = null;

            var smsAgent         = new MessenteAgent();
            var messenteResponse = smsAgent.SendMessage(toPhone.Text, messageContent.Text, options);

            MessageSendingResponse.Text = messenteResponse.IsSuccess
                                ? "Successfully gave message to messente server, sms id: " + messenteResponse.SuccessResult
                                : "Sending failed: " + messenteResponse.FailureReason;
        }
 public TwilioSmsNotificationMessageSender(IOptions <TwilioSenderOptions> twilioOptions, IOptions <SmsSendingOptions> smsSendingOptions)
 {
     _options           = twilioOptions.Value;
     _smsSendingOptions = smsSendingOptions.Value;
 }