You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Connect to the server, authenticate, set the sender and recipient,
// and send the email all in one step
// The Byte array provides both Subject and body
err := smtp.SendMail(
"smtp.example.com:587",
auth,
"me@example.com",
[]string{recipient@example.com},
[]byte("Subject: Test Subject Text \r\n\r\n Test Email Body Text"),
)
if err != nil {
fmt.Println("Email Error: ", err)
}