I will receive a eMail with two attachments
a) the textfile
both with the same filname, but the textfile has the ending of .txt, the p7s-detached Signaturfile has the ending of .p7s
Al eMail programms accepted both attachments, but chilkat recognizes only one attachments, the text file.
I can not extract the p7s-detached Signaturfile using chilkat and vbnet 10, because the function email.NumAttachments returns only 1 attachment
Please, show the example:
Content-Type: multipart/mixed; boundary=------------000007010604080006050102
This question is marked "community wiki".
Perhaps it is caused by this: http://www.chilkatsoft.com/faq/AttachedMsgsNumAttach.html
or this: http://www.cknotes.com/?p=280
answered Oct 21 '12 at 04:04
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 will no be longer available in its original form. Therefore, it is not possible to unwrap the PKCS7 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 Oct 22 '12 at 09:13
Thanks for the answer.
I load the eMail from a POP3-Server. The email has two attachments and, additionally, is encrypt and S/MIME-signed.
After the load of the eMail from the POP3-Server I decrypt and save the eMail to a .eml File. Do work with the S/MIME Signatur are not a problem. I get all relevant function like GetSignedByCert, ReceivedSigned, SignaturesValid a.s.o.
The saved eml-File contains the two attachment: Content-Disposition: attachment; filename=7406362956597X.txt Content-Type: application/x-pkcs7-signature; name=7406362956597X.p7s
But, I can not extract and save all two attachment, only the 7406362956597X.txt The Chilkat-email object returns only a number of 1 attachment.
answered Oct 24 '12 at 02:24
I modified the internal logic so that application/x-pkcs7-signature content-types are recognized as attachments if the content-disposition header explicitly specifies "attachment", as it does in your email.
Here is a new 32-bit .NET 4 assembly:
(Pre-releases are now v9.4.0. The anticipated release date of this new version is sometime in mid-December 2012.)
answered Oct 24 '12 at 11:11
many thanks to you
answered Nov 12 '12 at 04:04
Hello, i have the same Issue, my eml contains a p7s:
My version IS mail.Version "188.8.131.52"
I need to get the p7s file in my eml when i save it to disk, it's needed as proof (italian legal stuff), but when i load ans save the email with with this code, i loose the p7s part of the message
in mail, i do not have anymore the p7s, as it passes automatically the UnwrapSecurity call.. I would need that saveeml, saves the RAW email, as it's received with the p7s, a saveeml2, or a SaveRawEml would also be ok, as i need the mail exacly as it comes from my provider that serves the email trough imap/s and/or pop/s Thanks
This answer is marked "community wiki".
answered Sep 16 '13 at 10:05