I want to send E-Mails out of a Salesforce case. Now, I have already seen Cristian Negulescu’s tutorial on this on youtube - however, it’s already several years old by now, and my company does not seem to have “SendEmail” configured as a quickaction in our Salesforce.
How do I send out E-Mails via API-Call that are related to a Salesforce-Case, that use a certain template and Sender-mailadress? I’ve already managed to create a EmailMessage Object in Salesforce that’s related to a case, but it does not send out an email if I create it (even if I create it in the “Sent” status), so I would just have to send out that object, essentially.
To send out emails via API call that are related to a Salesforce case, you can use the Salesforce Email Services. First, make sure you have the necessary permissions and configurations to use Email Services. Then, create an email template and configure your Email Service to use that template and desired sender email address. You can use Apex code to create an EmailMessage object and populate its fields, including the related Case Id and template Id. Finally, call the insert method on the EmailMessage object to send out the email. Make sure to handle any exceptions and validate your code before sending out emails in a production environment.