using Microsoft.Maui.ApplicationModel.Communication; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Justice.Helpers { public static class EmailHelper { public static async Task SendEmailAsync(string subject, string body, string recipient) { try { var message = new EmailMessage { Subject = subject, Body = body, To = new List { recipient } }; await Email.ComposeAsync(message); } catch (FeatureNotSupportedException) { throw new Exception("Email is not supported on this device or platform."); } catch (Exception ex) { throw new Exception($"Unable to send email: {ex.Message}"); } } } }