apex:emailPublisher

The email publisher lets support agents who use Case Feed compose and send email messages to customers. You can customize this publisher to support email templates and attachments. This component can only be used in organizations that have Case Feed and Email-to-Case enabled. Ext JS versions less than 3 should not be included on pages that use this component.

Example 

This example displays the email publisher.

1<apex:page standardController="Case" showHeader="true">
2    <apex:emailPublisher id="myEmailPublisher"
3        entityId="{!case.id}"
4        width="600px"
5        title="Send an Email"
6        expandableHeader="false"
7        autoCollapseBody="false"
8        showAdditionalFields="false"
9        fromVisibility="selectable"
10        toVisibility="editable"
11        bccVisibility="hidden"
12        ccVisibility="hidden"
13        emailBody=""
14        subject=""
15        toAddresses=""
16        onSubmitFailure="alert('failed');"
17        fromAddresses="person1@mycompany.com,person2@mycompany.com"
18    />
19</apex:page>

Attributes 

Attribute NameAttribute TypeDescriptionRequired?API VersionAccess
autoCollapseBodyBooleanA Boolean value that specifies whether the email body will be collapsed to a small height when it is empty. 25.0
bccVisibilityStringThe visibility of the BCC field can be ‘editable’, ‘editableWithLookup’, ‘readOnly’, or ‘hidden’. 25.0
ccVisibilityStringThe visibility of the CC field can be ‘editable’, ‘editableWithLookup’, ‘readOnly’, or ‘hidden’. 25.0
emailBodyStringThe default text value of the email body. 25.0
emailBodyFormatStringThe format of the email body can be ‘text’, ‘HTML’, or ‘textAndHTML’. 25.0
emailBodyHeightStringThe height of the email body in em. 25.0
enableQuickTextBooleanIf the quick text autocomplete functionality will be available in the publisher. 25.0
entityIdidEntity ID of the record for which to display the email publisher. In the current version only Case record ids are supported.Yes25.0
expandableHeaderBooleanA Boolean value that specifies whether the header is expandable or fixed. 25.0
fromAddressesStringA restricted set of from addresses. 25.0
fromVisibilityStringThe visibility of the From field can be ‘selectable’ or ‘hidden’. 25.0
idStringAn identifier that allows the component to be referenced by other components in the page. 14.0global
onSubmitFailureStringThe JavaScript invoked if the email failed to be sent. 25.0
onSubmitSuccessStringThe JavaScript invoked if the email was successfully sent. 25.0
renderedBooleanA Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. 14.0global
reRenderObjectThe ID of one or more components that are redrawn when the email was successfully sent. This value can be a single ID, a comma-separated list of IDs, or a merge field expression for a list or collection of IDs. 25.0
sendButtonNameStringThe name of the send button in the email publisher. 25.0
showAdditionalFieldsBooleanA Boolean value that specifies whether the additional fields defined in the publisher layout should be displayed. 25.0
showAttachmentsBooleanA Boolean value that specifies whether the attachment selector should be displayed. 25.0
showSendButtonBooleanA Boolean value that specifies whether the send button should be displayed. 25.0
showTemplatesBooleanA Boolean value that specifies whether the template selector should be displayed. 25.0
subjectStringThe default value of the Subject. 25.0
subjectVisibilityStringThe visibility of the Subject field can be ‘editable’, ‘readOnly’, or ‘hidden’. 25.0
submitFunctionNameStringThe name of a function that can be called from JavaScript to send the email. 25.0
titleStringThe title displayed in the email publisher header. 25.0
toAddressesStringThe default value of the To field. 25.0
toVisibilityStringThe visibility of the To field can be ‘editable’, ‘editableWithLookup’, ‘readOnly’, or ‘hidden’. 25.0
verticalResizeBooleanA Boolean value that specifies whether the publisher allows vertical resizing. 30.0
widthStringThe width of the email publisher in pixels (px) or percentage (%). 25.0

See Also