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.
This commit is contained in:
2026-03-09 15:41:56 +01:00
parent 737774f077
commit eededeb1f1

View File

@@ -181,8 +181,6 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> 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<WorkerOptions> options, IConfiguration
private bool SendFinalEmailToReceivers(Envelope envelope, FinalEmailType mailToReceivers)
{
var includeAttachment = SendFinalEmailWithAttachment(mailToReceivers);
foreach (var receiver in envelope.EnvelopeReceivers ?? Enumerable.Empty<EnvelopeReceiver>())
{
if (actionService?.CompleteEnvelope(envelope, receiver.Receiver) == false)
@@ -207,9 +203,4 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
return true;
}
private static bool SendFinalEmailWithAttachment(FinalEmailType type)
{
return type == FinalEmailType.YesWithAttachment;
}
}