small pixel drawing of a pufferfish clist

Add moar error handling
j3s j3s@c3f.net
Mon, 23 Dec 2019 13:52:02 -0600
commit

985c6a7f0fe262a9fd15fee6f06e58f144d1bb98

parent

253e32e0f3ef55bc289ad0693e8f5ab66f0c0e7e

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M main.gomain.go

@@ -66,7 +66,7 @@

if flag.Arg(0) == "message" { msg, err := parsemail.Parse(bufio.NewReader(os.Stdin)) if err != nil { - log.Printf("ERROR_PARSING_MESSAGE Error=%q\n", err.Error()) + log.Printf("ERROR_PARSING_MESSAGE mail=%q msg=%q error=%q\n", os.Stdin, msg, err.Error()) os.Exit(0) } log.Printf("MESSAGE_RECEIVED From=%q To=%q Cc=%q Bcc=%q Subject=%q\n",

@@ -358,7 +358,7 @@

auth := smtp.PlainAuth("", gConfig.SMTPUsername, gConfig.SMTPPassword, "mail.c3f.net") err := smtp.SendMail("mail.c3f.net:587", auth, e.Sender.Address, recipients, e.ToBytes()) if err != nil { - log.Printf("ERROR SENDING MAIL: %q\n", err) + log.Printf("ERROR_SENDING_MAIL: Error=%q\n", err.Error()) } }