You may find in some cases that contents in your Apttus Temporary Email Templates folder contain sensitive contractual data as attachments to offline agreements. To remedy this, you can use the following APEX job and associated Comply System Property to clean up temporary email templates that are older than a configured period. When this job runs it checks for all temporary email templates older than the period configured by the new Comply System Property and deletes them.
Step 1: Configure APEX Scheduler Job
Schedule a new job using the Apex Scheduler using the standard Salesforce process.
From Setup, enter "Apex Classes" into the Quick Find box, select Apex classes, and click the Schedule Apex button.
Enter a Job Name and click the lookup button to choose CleanupJobScheduler as the Apex Class.
Choose the job Frequency and other execution options for the class.
Click Save.
Step 2: Configure Comply System Property
Use the Temp Email Template Inactive Hours Comply System Property to set the orphan period of temporary email templates to use in conjunction with the CleanupJobScheduler APEX class. The default value of this property is set to 4 hours.
Navigate to Setup > Develop > Custom Settings.
Click Manage next to Comply System Properties.
Click Edit.
Specify a value for the property Temp Email Template Inactive Hours. This sets the number of hours after which a temporary email template is considered inactive. When the CleanupJobScheduler job runs (Step 1), any temporary email templates which are older will be deleted.
Click Save.
Note: You cannot set this property value to zero (0) as it will interfere with the execution of your email templates. Please set the property to 1 or higher if you intend to configure temporary email cleanup.