I think you are using google SMTP configure setup. That won’t work because google have stopped the third party access from May 30 2022. SO try to use outlook configuration.
Here is Configuration for Outlook SMTP
Office 365 SMTP settings
Yes, “But Gmail and Yahoo no longer support logging in from less secure apps” is true.
Then you can use this password for your email template settings! If you need more help, I am always here :)
To test locally you can check out some dummy smtp server, I personally use smtp4dev
In the email module just configure the mailserver to localhost:25 and you're ready.
As you pointed out, those providers no longer support less secure apps.
If you need to send email, Mendix now offer a premium Email Service module in the Marketplace for an additional fee. This has its own SMTP server so you don’t need to rely on free services such as Gmail or Yahoo to send email.
Hope this helps.
You should use app specific password from your google account.
Firstly Go to the security of your google account. You should have 2 step verification enabled to get app specific passwords. Make sure to enable that. Then you can get and use that password in email configuration.I will attach the link below .
That will solve this error.
Hope this helps: )