feat: add greeting, dividers, and sign-off to envelope email body
- Prepend 'Hello,' greeting before first template body - Separate template bodies with a blank line + horizontal rule + blank line - Append 'Thank you, / Early Intervention Colorado' after last template body - Greeting + sign-off are included even when no templates supply a body
This commit is contained in:
parent
71a156df78
commit
3f3fe8dd71
|
|
@ -230,7 +230,16 @@ global with sharing class DocusignCompositeEnvelopeBuilder {
|
|||
if (envelopeSubject.length() > 100) {
|
||||
envelopeSubject = envelopeSubject.left(97) + '...';
|
||||
}
|
||||
String envelopeBody = bodyParts.isEmpty() ? '' : String.join(bodyParts, '\n\n');
|
||||
// Compose body: greeting → template bodies separated by a visual divider → sign-off
|
||||
String DIVIDER = '\n\n' + '─'.repeat(60) + '\n\n';
|
||||
String GREETING = 'Hello,\n\n';
|
||||
String SIGNOFF = '\n\nThank you,\nEarly Intervention Colorado';
|
||||
String envelopeBody;
|
||||
if (bodyParts.isEmpty()) {
|
||||
envelopeBody = GREETING + SIGNOFF;
|
||||
} else {
|
||||
envelopeBody = GREETING + String.join(bodyParts, DIVIDER) + SIGNOFF;
|
||||
}
|
||||
myEnvelope = myEnvelope.withEmail(envelopeSubject, envelopeBody);
|
||||
|
||||
// Send the envelope
|
||||
|
|
|
|||
Loading…
Reference in New Issue