Evan Chen 779eb57080 | ||
---|---|---|
attribute | ||
auth | ||
calendar | ||
control | ||
docs | ||
errors | ||
history | ||
server | ||
store | ||
system | ||
task | ||
util | ||
.gitignore | ||
Makefile | ||
README.md | ||
build.sh | ||
go.mod | ||
go.sum | ||
helper.go | ||
main_test.go | ||
run.sh |
README.md
Kumoly App
combine all needed module into one lib
Run
m := gomail.NewMessage()
m.SetHeader("From", "from@example.com")
m.SetHeader("To", "to@example.com")
m.SetHeader("Subject", "Hello!")
m.SetBody("text/plain", "Hello!")
s := gomail.SendFunc(func(from string, to []string, msg io.WriterTo) error {
// Implements you email-sending function, for example by calling
// an API, or running postfix, etc.
fmt.Println("From:", from)
fmt.Println("To:", to)
return nil
})
if err := gomail.Send(s, m); err != nil {
panic(err)
}