Dial for SMTP Connection in Go

Posted by yhuang
Public (Editable by Users)
Go
Edit
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)
	}
}