Skip to content

Commit b4236a6

Browse files
authored
readme: update server example to get errors from smtp
1 parent 9e949e0 commit b4236a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,23 @@ func (s *Session) AuthPlain(username, password string) error {
117117

118118
func (s *Session) Mail(from string, opts *smtp.MailOptions) error {
119119
if !s.auth {
120-
return ErrAuthRequired
120+
return smtp.ErrAuthRequired
121121
}
122122
log.Println("Mail from:", from)
123123
return nil
124124
}
125125

126126
func (s *Session) Rcpt(to string) error {
127127
if !s.auth {
128-
return ErrAuthRequired
128+
return smtp.ErrAuthRequired
129129
}
130130
log.Println("Rcpt to:", to)
131131
return nil
132132
}
133133

134134
func (s *Session) Data(r io.Reader) error {
135135
if !s.auth {
136-
return ErrAuthRequired
136+
return smtp.ErrAuthRequired
137137
}
138138
if b, err := ioutil.ReadAll(r); err != nil {
139139
return err

0 commit comments

Comments
 (0)