From 9b72905458a06eb0113d41893abd9cade79fda4c Mon Sep 17 00:00:00 2001 From: Alexandre Cesaro Date: Wed, 2 Sep 2015 13:38:54 +0200 Subject: [PATCH] Improved example readability --- example_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example_test.go b/example_test.go index 0575e53..59ff51a 100644 --- a/example_test.go +++ b/example_test.go @@ -73,7 +73,7 @@ func Example_daemon() { // Efficiently send a customized newsletter to a list of recipients. func Example_newsletter() { - // The list of recipient. + // The list of recipients. var list []struct { Name string Address string @@ -91,6 +91,7 @@ func Example_newsletter() { m.SetAddressHeader("To", r.Address, r.Name) m.SetHeader("Subject", "Newsletter #1") m.SetBody("text/html", fmt.Sprintf("Hello %s!", r.Name)) + if err := gomail.Send(s, m); err != nil { log.Printf("Could not send email to %q: %v", r.Address, err) }