There is a better and secure way to give non-Google apps “SMTP access” to the Google account. You can generate an “app password” and use that in ELK. It works as follows:
- Sign in to your Gmail account security
- Enable 2-step verification.
- Create an App password
- Use this password for SMTP.
The process to generate and use app password is documented here:
App password works with ELK. It is very secure. Also, it only allows SMTP access to the Google account and NOT the complete access to Gmail/Google account.
Another problem in using “Allow less secure apps” option is that this option get disabled after some time, auto-magically. Unless you check, you don’t know that this option has been disabled.