So I'm trying to wrap up implementing S/MIME support in the Enigma plugin. I've got cert import (from .p12) implemented, as well as verifying and decrypting working. Certs show up in the Settings menu as well with basic info.

For signing and encrypting openssl_pkcs7_sign/encrypt return fully encoded text files that are ready to be sent by a mail agent, whereas the message_ready hook is looking for a Mail_mime object. 

What would be the recommended course, either parse the file to create a Mail_mime object, or would there be a way to pass along the fully mail agent ready text from opening_pkcs7?

Kyle