Skip to content

Instantly share code, notes, and snippets.

@james4k
Created August 26, 2012 02:16
Show Gist options
  • Save james4k/3473189 to your computer and use it in GitHub Desktop.
Save james4k/3473189 to your computer and use it in GitHub Desktop.
func mail(msg ...interface{}) {
str := "Subject: " + Config.GMail.Subject + "\r\n\r\n" + fmt.Sprint(msg)
smtp.SendMail("smtp.gmail.com:587",
smtp.PlainAuth("", Config.GMail.User, Config.GMail.Password, "smtp.gmail.com"),
Config.GMail.From,
[]string{Config.GMail.To},
[]byte(str))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment