From eededeb1f109d698eeda80a02a95c0c3c65443b9 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 9 Mar 2026 15:41:56 +0100 Subject: [PATCH] Remove SendFinalEmailWithAttachment and related logic Removed the SendFinalEmailWithAttachment method and all references to it from SendFinalEmailToCreator and SendFinalEmailToReceivers. The logic for determining email attachments based on FinalEmailType is no longer used. Other functionality in these methods remains unchanged. --- .../Jobs/FinalizeDocumentJob.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs b/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs index ff7b6940..f7e7f4c3 100644 --- a/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs +++ b/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs @@ -181,8 +181,6 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration private bool SendFinalEmailToCreator(Envelope envelope, FinalEmailType mailToCreator) { - var includeAttachment = SendFinalEmailWithAttachment(mailToCreator); - if (actionService?.CompleteEnvelope(envelope) == false) { logger?.LogError(new Exception("CompleteEnvelope failed"), "Envelope could not be completed for receiver [{email}]", envelope.User?.Email); @@ -194,8 +192,6 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration private bool SendFinalEmailToReceivers(Envelope envelope, FinalEmailType mailToReceivers) { - var includeAttachment = SendFinalEmailWithAttachment(mailToReceivers); - foreach (var receiver in envelope.EnvelopeReceivers ?? Enumerable.Empty()) { if (actionService?.CompleteEnvelope(envelope, receiver.Receiver) == false) @@ -207,9 +203,4 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration return true; } - - private static bool SendFinalEmailWithAttachment(FinalEmailType type) - { - return type == FinalEmailType.YesWithAttachment; - } } \ No newline at end of file