diff --git a/EnvelopeGenerator.Application/Notifications/DocSigned/Handlers/SendSignedMailHandler.cs b/EnvelopeGenerator.Application/Notifications/DocSigned/Handlers/SendSignedMailHandler.cs index e3dceddb..8cfcf467 100644 --- a/EnvelopeGenerator.Application/Notifications/DocSigned/Handlers/SendSignedMailHandler.cs +++ b/EnvelopeGenerator.Application/Notifications/DocSigned/Handlers/SendSignedMailHandler.cs @@ -27,9 +27,27 @@ public class SendSignedMailHandler : SendMailHandler /// /// /// - /// - protected override void ConfigEmailOut(DocSignedNotification notification, EmailOut emailOut, CancellationToken cancel) + protected override void ConfigEmailOut(DocSignedNotification notification, EmailOut emailOut) { emailOut.ReferenceString = notification.EmailAddress; + emailOut.ReferenceId = notification.ReceiverId; } -} + + private static string TextToHtml(string input) + { + if (string.IsNullOrEmpty(input)) return ""; + + // HTML encoding special characters + string encoded = System.Net.WebUtility.HtmlEncode(input); + + // Convert tabs to   (4 non-breaking spaces) + encoded = encoded.Replace("\t", "    "); + + // Convert line breaks to
+ encoded = encoded.Replace("\r\n", "
"); // Windows + encoded = encoded.Replace("\r", "
"); // Mac old + encoded = encoded.Replace("\n", "
"); // Unix/Linux + + return encoded; + } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Notifications/SendMailHandler.cs b/EnvelopeGenerator.Application/Notifications/SendMailHandler.cs index 15cb9eea..e62eedfc 100644 --- a/EnvelopeGenerator.Application/Notifications/SendMailHandler.cs +++ b/EnvelopeGenerator.Application/Notifications/SendMailHandler.cs @@ -127,22 +127,4 @@ public abstract class SendMailHandler : INotificationHandler - encoded = encoded.Replace("\r\n", "
"); // Windows - encoded = encoded.Replace("\r", "
"); // Mac old - encoded = encoded.Replace("\n", "
"); // Unix/Linux - - return encoded; - } } diff --git a/EnvelopeGenerator.GeneratorAPI/EnvelopeGenerator.GeneratorAPI.csproj b/EnvelopeGenerator.GeneratorAPI/EnvelopeGenerator.GeneratorAPI.csproj index 60af0f1f..b9c86dc1 100644 --- a/EnvelopeGenerator.GeneratorAPI/EnvelopeGenerator.GeneratorAPI.csproj +++ b/EnvelopeGenerator.GeneratorAPI/EnvelopeGenerator.GeneratorAPI.csproj @@ -27,7 +27,7 @@ - +