This fixes two bugs: 1. `resetAndError` would be called on every error, including `io.EOF`, which is returned when the connection is terminated. Calling `m.client.Reset()` after a `io.EOF` will result in another error, causing us to wrap the `io.EOF` with a `errors.errorString`. This broke a check in `sendMail` that was used to cause a reconnect. 2. There was a error type cast that assumed the type without checking it, which could result in a panic when an error of the unexpected type was returned. |
||
---|---|---|
.. | ||
mailer.go | ||
mailer_test.go |