errors.go 407 B

12345678910111213141516
  1. package mail
  2. import "fmt"
  3. // A SendError represents the failure to transmit a Message, detailing the cause
  4. // of the failure and index of the Message within a batch.
  5. type SendError struct {
  6. // Index specifies the index of the Message within a batch.
  7. Index uint
  8. Cause error
  9. }
  10. func (err *SendError) Error() string {
  11. return fmt.Sprintf("gomail: could not send email %d: %v",
  12. err.Index+1, err.Cause)
  13. }