Skip to content

Instantly share code, notes, and snippets.

@jpillora
jpillora / smtp-gmail-send.go
Last active August 21, 2024 05:14
Send email using Go (Golang) via GMail with net/smtp
package main
import (
"log"
"net/smtp"
)
func main() {
send("hello there")
}
@andelf
andelf / smtp_login_auth.go
Created March 8, 2013 18:40
golang net/smtp SMTP AUTH LOGIN Auth Handler
// MIT license (c) andelf 2013
import (
"net/smtp"
"errors"
)
type loginAuth struct {
username, password string