Skip to content

Unable to Retrieve textproto.Error When Using gomail.Send() #102

@jordan-wright

Description

@jordan-wright

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions