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
Shantanu Punekar 5Shantanu Punekar 5 

Trigger to send Auto Response Email on Case

Hi,
I need to send an auto response email whenever a case is subbmited by EmailToCase. We (due to some reasons) cannot use Case Auto Response Rules. So I need to write a trigger which will send auto response email with template and importantly tagg the email under that perticular Case.

As a work around I created workflow to send such email but the email log is not seen under Case related list.
Can someone please help me starting up with the trigger?
VamsiVamsi
Hi 

Please go through the following links and they should be helping you to get this done !!

Please make sure to set "setTagetObjectId" or "setWhatId()" while setting the email template inorder to save the email under activities.

https://developer.salesforce.com/forums/?id=906F0000000BMYwIAO
https://salesforce.stackexchange.com/questions/76605/setsaveasactivity


Please mark as best answer if the above helps ...!!!