Edit subject of a message on Thunderbird [closed]

I’m currently coding an extension in Thunderbird that aims to improve security.
One of the features will be to automatically edit the subject of the message, when it is suspicious (for example “–SPAM–“)
Do you know if this is an API or a way to do this?