---
schema_version: "1"
id: aff95697f97bf80f8d980482e153aa0c0199572c537435302fdc242df434e8a7
title: RenderEmailTemplateBodyResult Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 33a78f93c4523094594a62610b2bbda5d31acf878c41318997f39f53e5e9841d
description: Contains the results for rendering email templates.If an error occurred during the renderEmailTemplate method, a RenderEmailTemplateError object is returned.Returns the rendered body text with merge field references replaced with the corresponding record data.Indicates whether the operation was successful.
---
# RenderEmailTemplateBodyResult Class

Contains the results for rendering email templates.

## Namespace

[Messaging](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Messaging.htm "The Messaging namespace provides classes and methods for Salesforce notifications and email functionality.")

- **[RenderEmailTemplateBodyResult Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.htm#apex_Messaging_RenderEmailTemplateBodyResult_methods)**

## RenderEmailTemplateBodyResult Methods

The following are methods for RenderEmailTemplateBodyResult.

- **[getErrors()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.htm#apex_Messaging_RenderEmailTemplateBodyResult_getErrors)**  
    If an error occurred during the renderEmailTemplate method, a RenderEmailTemplateError object is returned.
- **[getMergedBody()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.htm#apex_Messaging_RenderEmailTemplateBodyResult_getMergedBody)**  
    Returns the rendered body text with merge field references replaced with the corresponding record data.
- **[getSuccess()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_RenderEmailTemplateBodyResult.htm#apex_Messaging_RenderEmailTemplateBodyResult_getSuccess)**  
    Indicates whether the operation was successful.

### getErrors()

If an error occurred during the renderEmailTemplate method, a RenderEmailTemplateError object is returned.

#### Signature

public List<Messaging.RenderEmailTemplateError> getErrors()

#### Return Value

Type: List<Messaging.RenderEmailTemplateError>

### getMergedBody()

Returns the rendered body text with merge field references replaced with the corresponding record data.

#### Signature

public String getMergedBody()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getSuccess()

Indicates whether the operation was successful.

#### Signature

public Boolean getSuccess()

#### Return Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")