So no matter what you tell the person it is a mortal sin?
What if you are not thinking before you are speaking and you reveal something without meaning to?
No.
It has to be seriously damaging/have an intention to be seriously damaging (don’t scruple about the intention, ask a trustworthy priest for specific guidance if you are scrupulous) to the person/person’s name generally, also, one should take into account how highly respected the person being detracted about is…ie: a bishop vs a murderer…or isn’t mortally sinful because it is already commonly known…
If you reveal something without meaning to then you don’t have sufficient reflection/full consent of the will anyway, so even if it was seriously damaging, etc, then it would be venial sin.
On a side note about revealing things accidentally in conversation:
Don’t become scrupulous and avoid conversation b/c you “may” reveal something…simply instead one should practice thinking before speaking… or if this is impossible, then one should most likely refrain from speaking if he knows of a (seriously) damaging secret, and ABSOLUTELY IS LIKELY TO SPEAK IT.
Btw, detraction also requires intention.