Created
August 26, 2012 02:16
-
-
Save james4k/3473189 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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