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
Angel HFAngel HF 

Is it possible to count how many times an email template was used?

If an email is sent using a visualforce page, is it possible to add a code that counts how many times a particular email template has been sent?

Thanks in advance for your precious help.
JeffreyStevensJeffreyStevens
Sure - keep a number in an Object or Custom Setting.  Have the VF page's controller get the Object record or Custom Setting, increment the counter and re-write it.