From b4236a6d6ff4a5cd166ce0cec02b92c66f6dd3d0 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 7 Jul 2023 09:22:21 -0400 Subject: [PATCH] readme: update server example to get errors from smtp --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 75a6d2f..1ff3904 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ func (s *Session) AuthPlain(username, password string) error { func (s *Session) Mail(from string, opts *smtp.MailOptions) error { if !s.auth { - return ErrAuthRequired + return smtp.ErrAuthRequired } log.Println("Mail from:", from) return nil @@ -125,7 +125,7 @@ func (s *Session) Mail(from string, opts *smtp.MailOptions) error { func (s *Session) Rcpt(to string) error { if !s.auth { - return ErrAuthRequired + return smtp.ErrAuthRequired } log.Println("Rcpt to:", to) return nil @@ -133,7 +133,7 @@ func (s *Session) Rcpt(to string) error { func (s *Session) Data(r io.Reader) error { if !s.auth { - return ErrAuthRequired + return smtp.ErrAuthRequired } if b, err := ioutil.ReadAll(r); err != nil { return err