mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-14 01:42:54 +01:00
Add affected message ID to error log
Include the affected message ID in the error message to provide more context for debugging. This change ensures that each error log contains essential information about the specific message associated with the error.
This commit is contained in:
parent
0239318d94
commit
f469ba977d
1 changed files with 5 additions and 0 deletions
|
@ -93,6 +93,11 @@ func (e *SendError) Error() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if e.affectedMsg != nil && e.affectedMsg.GetMessageID() != "" {
|
||||||
|
errMessage.WriteString(", affected message ID: ")
|
||||||
|
errMessage.WriteString(e.affectedMsg.GetMessageID())
|
||||||
|
}
|
||||||
|
|
||||||
return errMessage.String()
|
return errMessage.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue