Guest site user causing TEMPLATE_NOT_FOUND error

You may get this error that email is not being sent when guest user is creating record (ex. Case creation, self registration etc.) – Error can be as “Submission Error: The record couldn’t be saved because it triggered an email alert that failed. Please contact Customer Support.” like

Actually, it’s security measure taken by Salesforce topProtect access to your company‚Äôs data when you send emails that use Visualforce Classic email templates to guest users. These templates can be used with Process Builder, Workflow Builder, and Apex calls.

In order to make it working for guest user, add below attribute in emailtemplate definition: