namespace PowderCoating.Application.Interfaces; /// /// Represents a file to attach to an outbound email. /// public record EmailAttachment(byte[] Data, string Filename, string ContentType); public interface IEmailService { /// /// Sends a plain or HTML email, optionally with a single file attachment (used for invoice /// and quote PDFs). For multiple attachments such as job photos use /// . /// Task<(bool Success, string? ErrorMessage)> SendEmailAsync( string toEmail, string toName, string subject, string plainTextBody, string? htmlBody = null, byte[]? attachmentData = null, string? attachmentFilename = null, string? attachmentContentType = null, string? replyToEmail = null, string? replyToName = null); /// /// Sends an email with one or more file attachments (e.g. job photos). Callers are /// responsible for keeping total attachment size under SendGrid's 30 MB per-message limit. /// Task<(bool Success, string? ErrorMessage)> SendEmailWithAttachmentsAsync( string toEmail, string toName, string subject, string plainTextBody, string? htmlBody = null, IList? attachments = null, string? replyToEmail = null, string? replyToName = null); }