Hi, I am sending a DocuSign email from Apex and using the Salesforce Email Template to generate the Email Body. I am using Messaging.renderStoredEmailTemplate to get the HTML body, and when I check the result using System.debug the HTML content is correctly generated and present.
However, after the email is sent, the email body is completely blank.
Relevant Code:
Messaging.SingleEmailMessage renderResult = Messaging.renderStoredEmailTemplate(
opportunityEmailTemplateId, opportunityId_i, myContact.Id
);
String opportunityOfferEmailContent = renderResult.getHtmlBody();
myEnvelope = myEnvelope.withEmail(
opportunityOfferEmailSubject, //Subject
opportunityOfferEmailContent //Email Body
);
myEnvelope = dfsle.EnvelopeService.sendEnvelope(
myEnvelope,
true
);
How do I resolve this?
Kind Regards
Willy
Back to Docusign.com


