Add interface import and update email sending condition

Added import for EnvelopeGenerator.Domain.Interfaces. Updated logic to send final emails to receivers only if the envelope requires "Read and Sign," adding an extra check to the email dispatch condition.
This commit is contained in:
2026-03-11 17:45:27 +01:00
parent 05d54e87c3
commit 176672d7eb

View File

@@ -15,6 +15,7 @@ Imports DigitalData.Core.Abstraction.Application
Imports EnvelopeGenerator.Infrastructure
Imports Microsoft.EntityFrameworkCore
Imports DigitalData.Core.Abstractions
Imports EnvelopeGenerator.Domain.Interfaces
Namespace Jobs
Public Class FinalizeDocumentJob
@@ -350,7 +351,7 @@ Namespace Jobs
Logger.Warn($"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}] ")
End If
If oMailToReceivers <> FinalEmailType.No Then
If oMailToReceivers <> FinalEmailType.No And pEnvelope.IsReadAndSign() Then
Logger.Debug("Sending emails to receivers..")
SendFinalEmailToReceivers(pEnvelope) ', pAttachment
Else