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
Nirmala  KuchiNirmala Kuchi 

Is it possible to use Javascript in email templates?

Hi Everyone,

Is it possible to use javascript in Email templates?

I'm getting below error when I try to include inline javascript or external js file(included from static resource):

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src https://cs85.salesforce.com". Either the 'unsafe-inline' keyword, a hash ('sha256-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'), or a nonce ('nonce-...') is required to enable inline execution.

Is it possible to override the meta tag and enable script?

My requirement is to send ChartJS components over email.

Thanks!
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Nirmala,
May I suggest you please refer the below link for reference. Hope it will be helpful.

Thanks 
Rahul