It's useful to retrieve the *textproto.Error when sending emails so my client will know how best to handle the error.
I see in #37 that this used to be possible, but it looks like future changes wrapped the changes in a generic error string that makes it seemingly impossible to retrieve the original *textproto.Error: https://github.com/go-gomail/gomail/blob/master/send.go#L39.
I see the value in indicating the index that this error occurred on, but maybe this could be wrapped in a struct that implements the error interface or something? Without the ability to access the underlying error, it's difficult to write a compliant smtp client.
It's useful to retrieve the
*textproto.Errorwhen sending emails so my client will know how best to handle the error.I see in #37 that this used to be possible, but it looks like future changes wrapped the changes in a generic error string that makes it seemingly impossible to retrieve the original
*textproto.Error: https://github.com/go-gomail/gomail/blob/master/send.go#L39.I see the value in indicating the index that this error occurred on, but maybe this could be wrapped in a struct that implements the error interface or something? Without the ability to access the underlying error, it's difficult to write a compliant smtp client.