This error may have to do with the 'Send Email' permission on the user's profile or permission set in Salesforce. Navigate to Setup and find the user's profile or permission set. Check the "Send Email" box in the "Systems Permissions" section.
NOTE: This permission requires that the user also has the "Edit Tasks" permission.
See this Salesforce Help Article for more information.
It's also important to set "Deliverability" in Setup to "All email". See this Salesforce article for more information. If you are in a sandbox, see this article for more information.