You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Seekers/Helpers/SmsHelper.cs

23 lines
619 B

using Microsoft.Maui.ApplicationModel.Communication;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Justice.Helpers
{
public static class SmsHelper
{
public static async Task SendSmsAsync(string message, List<string> recipients)
{
try
{
var smsMessage = new SmsMessage(message, recipients);
await Sms.ComposeAsync(smsMessage);
}
catch (Exception ex)
{
throw new Exception($"Unable to send SMS: {ex.Message}");
}
}
}
}