S/mime Mail with Lotus script agent

I am tring to send a s/mime mail with a Lotus Script agent. This agent is scheduled on a Domino Server version 5.0.11 .

If i send s/mime mail with the client of the server it works fine. But With a Lotus script agent i have the following error message when i used the signOnSend property of notesdocument

“The encrypted data has been modified or the wrong key was used to decrypt it.”

So could i do this with a R5, or R6 or R6.5 Version of the domino server ?

Thank your for your answer.

David Betrisey