This commit is contained in:
Jonathan Jenne
2023-11-20 16:42:11 +01:00
parent 624266a971
commit 56688d2690
18 changed files with 305 additions and 59 deletions

View File

@@ -33,16 +33,8 @@ Public Class EnvelopeEditorController
Public Function SendEnvelope() As Boolean
For Each receiverItem As EnvelopeReceiver In Envelope.Receivers
Dim oEmailData As New EmailData With
Dim oEmailData As New EmailData(Envelope, receiverItem) With
{
.EmailAdress = receiverItem.Email,
.EmailSubject = Envelope.Subject,
.Message = Envelope.Message,
.ReferenceID = Envelope.Id,
.ReferenceString = Envelope.Uuid,
.ReceiverName = receiverItem.Name,
.SenderAdress = Envelope.User.Email,
.SenderName = Envelope.User.FullName,
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, Envelope.Uuid, receiverItem.Signature)
}
@@ -58,9 +50,22 @@ Public Class EnvelopeEditorController
If EnvelopeModel.Send(Envelope) Then
'TODO: Send email to History
Return True
Dim newHistoryEntry As New EnvelopeHistoryEntry With {
.EnvelopeId = Envelope.Id,
.ActionType = EnvelopeHistoryActionType.Sent,
.UserReference = Envelope.User.Email
}
If HistoryModel.Insert(newHistoryEntry) Then
'TODO: Send email to History
Return True
Else
Logger.Warn("History Entry could not be created!")
Return False
End If
Else
Logger.Warn("Envelope could not be updated!")
Return False
End If
End Function