This blog signifies how Salesforce user can send Email from Salesforce using the custom methods and design the Email layout as per their choice. User can develop email templates or craft an email with the help of apex code. For sending the mail the user can utilize triggers, workflow rules or process builder as per their wish. But what if the user wishes to send an email along with the attachment. Well, this is where Salesforce is currently falling short.
Although the user can send an email from Salesforce by using various methods, sending an email along with attachments is not quite possible. So, here’s a step by step guide on how to send an email along with attachments from Salesforce. The components that we will require for this functionality is a VisualForce page and an Apex class.
1. Create an Apex class and use the code mentioned in the below image.
2. Now for VisualForce page, use the below mentioned code.
The apex class consists of logic that will store the attachment and then send the mail accordingly. The VisualForce page is a mere interface which simply helps in implementing the functionality.
The user enters the email address in the field “Send To” and then enters the respective Subject and the body of the mail. The user then clicks on “Browse” to select the file to be sent as an attachment and then the user clicks on “Attach & Send”. Once the user clicks on this button the attachment selected gets stored/inserted into Document object and the mail is sent along with attachment to the mentioned email address.
Greytrix as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.
Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support to business partners and end users.
Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star app listed on Salesforce AppExchange.
For more information, please contact us at email@example.com. We will be glad to assist you.