Email Service is a premium product and needs a license, though there is a free trial available. Have you set either of these up?
https://docs.mendix.com/appstore/app-services/email-service/#2-installation
If you have already done this, have you also set the Username and SecretKey constants with the values you got from that previous step?
https://docs.mendix.com/appstore/app-services/email-service/#configure-keys
I hope this helps.
Have you solved this problem? My application has the same problem.