Created
January 28, 2022 01:03
-
-
Save jonasermert/9818f2bfcdb9109611593e008887e6ff to your computer and use it in GitHub Desktop.
Sending mail with Goland Standard Library
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
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