I had this error today:
To solve this issue turn on email deliverability in your email settings:
1: Search for Deliverability
2: Change the Access level to ‘All email’.
Please note that this means emails will be delivered out from your org, including workflow emails etc so I advise turning it off when you are finished testing / developing.