Why am i getting the error "User doesn't have right privileges to send single email"

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.

image.png

NOTE: This permission requires that the user also has the "Edit Tasks" permission.

image.png

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.