For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To: Sending Generated Documents via Email

Once documents are generated using the Generate Documents (S-Docs) Lightning Web Component, they are automatically listed in the Documents (S-Docs) component on the record page. From this component, users can select one or multiple generated documents and send them together in a single email.

Sending Documents Using an Email Template

The Documents (S-Docs) LWC allows you to predefine an email/HTML template that will be used when sending documents.

To use a specific email template:

  • Specify the Email Template Name in the component configuration (as shown in the screenshot below).

  • The template must be an HTML Email Template available for the object.

Considerations:

  • Only one email/HTML template can be configured per component.

  • Multiple email templates cannot be used simultaneously.

  • The configured template will automatically load when sending documents from the component.

Sending Documents Without a Predefined Template

Configuring an email template is optional.

If no email template is specified, select the “No Template” option.

  • The email editor will still open when you send documents.

  • You can manually customize the email at the time of sending.

  • This provides flexibility for users who need to customize emails on a case-by-case basis.

Automatically Opening the Email Editor After Document Generation

When generating documents using the Templates to Generate (S-Docs) LWC, you can configure the system to automatically open the email editor immediately after document generation.

To enable this behavior:

  • Check the Automatically Open Email Editor option within the Documents component.

This allows users to:

  • Generate documents

  • Immediately attach them to an email

  • Send the email without navigating away from the record page

Configuration Steps :

1

Click Edit Page in Lightning App Builder.

2

Select the Documents (S-Docs) component.

3

In the component properties:

  • Choose an HTML Email Template from the dropdown list.

4

Click Save and activate the page.

Sending Emails :

1

Open the record page.

2

Select one or more generated PDF documents from the Documents (S-Docs) component.

3

Click Send.

4

Review and modify the email content if needed.

5

Click Send to deliver the email with the selected documents attached.

Considerations:

  • An email address is required in the To: field prior to sending

  • The To:, CC:, Subject, and Body can be pulled directly from the template.

Last updated

Was this helpful?