Documentation Version
Winter '16 (API version 35.0)
  • Winter '16 (API version 35.0) 35.0
  • Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English


Compose an attachment and append it to the email.


<messaging:emailTemplate recipientType="Contact"
	subject="Case report for Account: {!}"

		<p>Dear {!},</p>
		<p>Attached is a list of cases related to {!}.</p>
		<apex:outputLink value="">
			For more detailed information login to

	<messaging:attachment renderAs="PDF" filename="yourCases.pdf">
		<p>You can display your {!} cases as a PDF</p>
		<table border="0" >
			<th>Case Number</th><th>Origin</th>
			<th>Creator Email</th><th>Status</th>
		<apex:repeat var="cx" value="{!relatedTo.Cases}">
			<td><a href = 


Attribute Name Attribute Type Description Required? API Version Access
filename String Sets a file name on the attachment. If a filename is not provided, one will be generated for you. 14.0
id String An identifier that allows the attachment component to be referenced by other components in the page. 14.0 global
inline Boolean Sets the content-disposition of the attachment in the email to Inline. 17.0
renderAs String Indicates how the attachment should be rendered. Valid values are any mime type/subtype. The default value is 'text'. 14.0
rendered Boolean A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. 14.0 global