Skip to content

Commit ffb207c

Browse files
committed
readme: update example with latest API
1 parent 7006326 commit ffb207c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ import (
6868
type Backend struct{}
6969

7070
// Login handles a login command with username and password.
71-
func (bkd *Backend) Login(username, password string) (smtp.User, error) {
71+
func (bkd *Backend) Login(state *smtp.ConnectionState, username, password string) (smtp.User, error) {
7272
if username != "username" || password != "password" {
7373
return nil, errors.New("Invalid username or password")
7474
}
7575
return &User{}, nil
7676
}
7777

7878
// AnonymousLogin requires clients to authenticate using SMTP AUTH before sending emails
79-
func (bkd *Backend) AnonymousLogin() (smtp.User, error) {
79+
func (bkd *Backend) AnonymousLogin(state *smtp.ConnectionState) (smtp.User, error) {
8080
return nil, smtp.ErrAuthRequired
8181
}
8282

0 commit comments

Comments
 (0)