Пример #1
0
func mailService(rw http.ResponseWriter, req *http.Request) {
	content := "Something changed:\n\n"
	reqb, err := ioutil.ReadAll(req.Body)
	if goutils.CheckErr(err) {
		content += err.Error() + "\n"
	}
	content += goutils.ToString(reqb)
	fmt.Println(req.RequestURI)
	fmt.Println(content)
	mail.SendMail(content)
}
Пример #2
0
func (e *MailExcutor) Excute() {
	fmt.Println("\n****************************")
	fmt.Println("Time is over!")
	fmt.Println("****************************")
	mail.SendMail("Time is over")
}