Skip to main content

New answers tagged

0 votes

Getting error while sending email

Please check the doc. setTargetObjectId(targetObjectId) Required if using a template, optional otherwise. The ID of the contact, lead, or user to which the email will be sent. The ID you specify sets ...
Andrii Muzychuk's user avatar
0 votes

Getting error while sending email

Changes you should do in your code: Target Object: Change email.setTargetObjectId(c.OwnerId) to email.setTargetObjectId(c.ContactId) to ensure the target is a contact associated with the case, not a ...
Umesh Beti's user avatar
0 votes

Unable to send Email

You need to add email.setWhatId(c.Id) to set the relationship that will resolve the Case reference.
sfdcfox's user avatar
  • 497k
0 votes

Emails not being sent

I was facing the same issue and the solution was that the PersonContactId wasn't the primary key (I had chosen that field for he subscriber relationship). Once I changed that, I was able to send the ...
Mari Hurrie's user avatar

Top 50 recent answers are included