Salesforce provides different types of Email templates like Text template, HTML, Custom and Visualforce email template. The visualforce email template is a very powerful template type as we can create a custom Visualforce page and display it as an Email body. Along with this, it also provides flexibility of adding an attachment in the mail.
Please find below code snippet to demonstrate the same:
Visualforce template allows us to add an attachment of different types such as pdf, excel, csv or html file. The type of an attachment is specified using “renderAs” attribute. You can also specify the name of the file using “filename” attribute.
The result of the above code snippet looks like:
After opening up an attachment, it looks like:
Thus, we can send any file or document as an attachment along with mail using Visualforce email template.
About Us
Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customization’s, data migration, system integrations, third party add-on development and implementation expertise.
Greytrix have some unique solutions for Cloud CRM such as Salesforce integration with Sage X3, Sage 100 and Sage 300. We also offer best-in-class Cloud CRM Salesforce customization and development services to business partners and end users. Greytrix have some unique solutions for On-Premise CRM such as Sage CRM integration with Sage X3, Sage 100, Sage 300, Sage 500 and Sage 50 . We also offer best-in-class On-Premise Sage CRM customization and development services to business partners and end users.
For more information, please contact us at salesforce@greytrix.com. We will be glad to assist you.
Pingback: How to Send an Email to a Quote Owner - Salesforce.com-Tips and Tricks
Pingback: Using 'action' attribute at VF Page tag - Salesforce.com-Tips and Tricks
Pingback: Implementing RSS feeds on your Home Page using Visualforce page - Salesforce.com-Tips and Tricks
Pingback: How to rename the Field label in Salesforce for managed package - Salesforce.com-Tips and Tricks