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
K_devK_dev 

Sending 5000 emails with pdf attachments to different contacts

I have a req saying email the attachments  to all contacts whose preference is email (dropdown field)

we have 5000 different contacts must be emailed with their attachments every month
it is one contact having a child object   CBR reports has attachment pdfs need to be emailed with one click. How is it possible.ours is enterprise editioon.
 
Creating a VF page collects contacts child records and their attachments to send email how?
 
Creating a javascript button that calls a batch class which sorts out all of these records and their emails sending the attachments?
 
Please let me know the best solution as it is a monthly recurring event by admin and share some code snippet which helps for this master detail attachment pdfs sending from contact.
sfdcfoxsfdcfox
You can't send 5,000 mails at once normally (but you can submit a case with support and verify this). You'd have to normally split the mailing across several days (5 days minimum, in most cases). Alternatively, you could send mass messages through Vertical Response, Got Marketing!, or another marketing email platform. The exact code you'll need will depend on the solution you go with. I'd look into the marketing email platforms first, as they have a lot of flexibility and are fairly inexpensive.
K_devK_dev

This is not for marketing it is a monthly routine to email their pdfs from a database (it is national database for doctors everytime registers and updates info) from this database we need to import 5000 different customers,their 5000 different pdfs every month need to send an email once in a month.How to achieve this?