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