20-11-23
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user