I have installed prometheus and alertmanager for email notification into my gmail account.
But getting error that given google or gmail app password is not accepted.
I have given correct username, email and password
Logs of alertmanager below level=warn ts=2020-09-30T13:25:50.041Z caller=notify.go:674 component=dispatcher receiver=slack integration=email[0] msg=“Notify attempt failed, will retry later” attempts=3 err="*email.loginAuth auth: 535 5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials m1sm194703lfr.32 - gsmtp"
Google is not allowing you to log in because it has flagged this sort of login as "less secure", so what you have to do is go to this link while you're logged in to your google account, and allow the access:
https://www.google.com/settings/security/lesssecureapps