Original post

Hello,

I am currently exploring the SMTP module from github.com/emersion/go-smtp.

So far things work well, but there is one thing I can not wrap my head around.
Certain commands, like Rcpt() are specified to return error but actually return
*SMTPError.

So when I write code that accesses the specific fields and functions of SMTPError,
the compiler tells me that these are undefined, since it expects error.

I don’t even know what to google for. Are there any examples on how to work with
a generic error that’s “overwritten” by a module-specific error? All pointers welcome.

Cheers,
Lordy