login about faq


This is our code flow of a function: Plain Email => Convert to Mime => Sign with Mime.AddDetachedSignature => Encrypt with Mime.AddEncryptCert and Mime.EncryptN => Convert back to Email => Send out using MailMan.

The reason we don't use Encrypt and Sign functions of Email is we need to manipulate the Mime object during signing and encryption since Email doesn't have AddDetachedSignature and Encrypt/EncryptN functions.

When we use the function Email.SetFromMimeObject, it automatically unwraps security of the Mime object. Is there any way we can convert from a Mime object to Email object without unencrypt it automatically?

asked Nov 16 '12 at 16:27

otteporihs's gravatar image


Unfortunately, it's not possible. The solution is to change the workflow to this: Plain Email => Add From/To/Subject/etc. => Convert to Mime => Sign with Mime.AddDetachedSignature => Encrypt with Mime.AddEncryptCert and Mime.EncryptN => => Send out using MailMan.SendMime

(When an email object loads MIME via the LoadEml method, or by calling SetFromMimeText, or when it is loaded internally by the MailMan/IMAP objects when receiving email from a server, the MIME is decomposed and stored in an internal email object model. Because the MIME is decomposed, it is at this point that all signatures (if present) must be verified because the MIME is no longer available in its original form. Therefore, it is not possible to unwrap the security layers at a later time. The results of signature verification and/or decryption are available in the email object properties: ReceivedSigned, ReceivedEncrypted, SignaturesValid, Decrypted, and by methods: GetSignedByCert, GetEncryptedByCert, etc.Note: This only applies to the Chilkat.Email object, not the Chilkat.Mime object.)


answered Nov 18 '12 at 14:22

chilkat's gravatar image

chilkat ♦♦

edited Nov 18 '12 at 14:22

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 16 '12 at 16:27

Seen: 1,371 times

Last updated: Nov 18 '12 at 14:22

powered by OSQA