Sendgrid mail unauthorized only in hooks

this solution is working for my case with previous error messages for all environments. I have explicitly set Sendgrid API key with double quotes string in config/plugins.js rather than get it from an environment variable (in that case, it will be only working on local).