d := gomail.NewDialer(“smtp.example.com”, 587, “user”, “123456”)
so that “example” became “gmail” and the user and password are correct. I also tried changing 587 to 465.
Neither work. I get the error:
panic: 535 5.7.8 Username and Password not accepted. For more information, go to
5.7.8 PREFIX support . google . com / mail / ?p=BadCredentials 6a1803df08f44-6c340bfa70asm21454206d6.12 - gsmtp
If you are 100% sure that all the data is correct, and even so you get the same error message, I would recommend testing with another email library, the last commit of go-gomail/gomail was 8 years ago;