Skip to content

Instantly share code, notes, and snippets.

@jonasermert
Created January 28, 2022 01:03
Show Gist options
  • Save jonasermert/9818f2bfcdb9109611593e008887e6ff to your computer and use it in GitHub Desktop.
Save jonasermert/9818f2bfcdb9109611593e008887e6ff to your computer and use it in GitHub Desktop.
Sending mail with Goland Standard Library
package mail
from := "Your email adress"
auth := smtp.PlainAuth("Username", from, "", "Serveradress")
err = smtp.SendMail("Server:Port", auth, from, []string{"emailOfRecipient"}, []byte{"Your email content"})
if err != nil {
log.Println(err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment