package main import ( "log" "net/smtp" ) func main() { // Connect to the remote SMTP server. c, err := smtp.Dial("mail.example.com:25") if err != nil { log.Fatal(err) } }