app/README.md

564 B

Kumoly App

combine all needed module into one lib

Run


Email

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)
}