MailKit.Security.AuthenticationException: '535: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 https://support.google.com/mail/?p=BadCredentials k27sm7123106pfg.95 - gsmtp' in .net core code example
Example: Error: Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials f2sm17674989iop.6 - gsmtp
This code is perfectly worked only need to change in gmail account to access lesssecureapps. https://myaccount.google.com/lesssecureapps ==> On