function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Sending attachments with email

Hi All,


Is there any way I can send an attachment with the email notification?

I need to design a custom button that can send an email notification to customer with a PDF attachment. PDF is stored with the record as attachment.

Or is there any possibility that on click of a custom button we can store this PDF file to an external (FTP) location and can send the URL with the mail to customer.


Any information will be greatly appreciated.



Satyendra Singh


You can use the outbound email classes and methods with the above example to send the PDF to a recipient.  Take a look at the setFileAttachments and setDocumentAttachments methods.

Outbound Email classes:

Message Edited by tmatthiesen on 08-03-2008 04:09 PM
Hi tmatthiesen,

Thanks a lot.

i am able to figureout the solution, now i am reading the attachment record  from Notes and Attachment section and using apex code able to send this file as attachment with email notification.




can you show me sample how you were able to email files from "Notes and Attachments"




Hi Satyendra,


I am also facing a same situation here. It would be a great help to newbies like me if you could post an example of how you implemented this.


Thanks a lot,


jaya sai prasadjaya sai prasad


If you want to send an Email with Attachment a native salesforce app MassMailer DOCS is perfect for you.
MassMailer DOCS let’s you send mass email attachments to your leads or contacts while securely storing your files with Rackspace Cloud Files.

You can try this app by installing from appexchange  - Massmailer Docs

You can learn more details about the product on this website -