go-smtp
go-smtp copied to clipboard
📤 An SMTP client & server library written in Go
@foxcpp the #146 PR introduced a breaking change. While adapting my code to meet the recent package requirements I noticed that AUTH can be ignored. A simple server code [example](https://github.com/emersion/go-smtp#server)...
PLAIN auth is enabled by default and it is not possible to disable it: https://github.com/emersion/go-smtp/blob/30169acc42e795e5d35ce901c8387950b103dfd9/server.go#L86-L87 it also doesn't look correct that `Session` interface now requires the `AuthPlain` method (#146). Why...
There is only one way to initialize an SMTP client: `NewClient` function. This function doesn't allow to set greetings timeout and it has hardcoded 5 minutes timeout, even if the...
Add server's hostname (domain) into the `ConnectionState` struct. It can be used for logging purposes.
There there is no way to catch errors, returned by handleConn method: https://github.com/emersion/go-smtp/blob/30169acc42e795e5d35ce901c8387950b103dfd9/server.go#L124 https://github.com/emersion/go-smtp/blob/30169acc42e795e5d35ce901c8387950b103dfd9/server.go#L128
there are many linter errors that should be resolved. I checked some, there are some around. ``` client_test.go:524:5: `sendMailServer` is unused (deadcode) var sendMailServer = `220 hello world ^ client_test.go:534:5:...
```go type Feature int const ( FeatureSMTPUTF8 = 1
1. Methods of `Session` interface have to return `smtp.SMTPError{...}` to customize returned smtp code and message. Although it's ok to set smtp code `250` for normal exit with `SMTPError{...}`, but...