Prerequisites To follow along, you will need to have golang installed locally Step 1: Create a project and configure it Create a project directory, and in that type the following commands. go mod init send_mail We are going to use the GoDotEnv packa...

Markdown supported · ⌘↵ to post
Kenneth
I think the reason you can't communiate off of port 587 is because of Go, not gmail. The go doc for the PlainAuth function says:
func PlainAuth(identity, username, password, host string) Auth ... PlainAuth will only send the credentials if the connection is using TLS or is connected to localhost. Otherwise authentication will fail with an error, without sending the credentials.587 is the standard outgoing port for TLS communications via SMTP.