Tailor signature certificate email copy for approvals
Store the per-signature email subject as text on the electronic_signatures row at creation time, mirroring the consent_text pattern. The document approval service sets "Your approved <Title> - Certificate of Completion"; other callers default to "Your signed <Name> - Certificate of Completion". The certificate worker uses signature.email_subject as the email subject, falling back to the default format when the column is empty. Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -271,7 +271,12 @@ func (h *completionCertificateHandler) generateCertificate(
|
||||
docName = signature.DocumentType.DisplayName()
|
||||
}
|
||||
|
||||
subject, textBody, htmlBody, err := emailPresenter.RenderElectronicSignatureCertificate(ctx, ref.UnrefOrZero(signature.SignerFullName), docName)
|
||||
subject := signature.EmailSubject
|
||||
if subject == "" {
|
||||
subject = fmt.Sprintf("Your signed %s - Certificate of Completion", docName)
|
||||
}
|
||||
|
||||
textBody, htmlBody, err := emailPresenter.RenderElectronicSignatureCertificate(ctx, ref.UnrefOrZero(signature.SignerFullName), docName, subject)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("cannot render email: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user