1

My org have a lot of contacts - around 2000. All of these contacts have e-mail address. I need to send an e-mail to each of them. An admin will enter a body (on a VF page) and click "send e-mails" button. The question is will this work? In General Email Limits is a note

There’s no limit on sending individual emails to contacts, leads, person accounts, and users in your organization directly from account, contact, lead, opportunity, case, campaign, or custom object pages.

So is it a case? Can I send 2000 e-mail to my contacts (one e-mail to each contact)?

What should be written in controller? I found MassEmailMessage Methods. There is a setTargetObjectIds(ID[]) method. But I'm not sure what does

All email must have a recipient value of at least one of the following: toAddresses ccAddresses bccAddresses targetObjectId targetObjectIds

mean. Anyone?

2

You will need to use SetTargetID method with ID array patameter as the contact Ids .The email limits wont apply if you use SetTargetID method .Dont use toaddress method onstead use setTargetId .

Using setTargetId method email limit wont count against governor limit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.