Hi
My program downloads multipart/mime messages from a remote server and saves them to an Outlook email file (*.eml). I can open the email message in Outlook and view/process the attachments, however I want to automate this.
I want to be able to open the *.eml file in Binary mode and extract the binary content and ignore the email header information (which is in text). The "Content-Length" parameter of the email header tells me the amount of binary content to extract but I cannot determime the byte position of the BOF of the binary file. Here is an example of the message that I am trying to parse:
[tt]
--------------Boundary-144574622.1290485831618@SYSQ
MIME-Version: 1.0
From: <>
Message-Id: <13239313.69759121290467473014.JavaMail.>
Date: Mon, 22 Nov 2010 23:11:13 GMT
Accept: application/pkcs7-mime; text/plain
Disposition-notification-to: <>
Disposition-notification-options: signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1
Receipt-delivery-option:
Content-Type: Application/pkcs7-mime
Content-Length: 26718
0‚hZ *†H†÷
<<<26718 of binary>>>
È<Ø?§Ðû²- Æ?ía(LÒà0²+3ÌF°'6 }a°q!ÜNJRÜn=É!ÛÀZŸëNC
--------------Boundary-144574622.1290485831618@SYSQ
MIME-Version: 1.0
From: <>
Message-Id: <29295355.61553261290208372191.JavaMail.>
Date: Fri, 19 Nov 2010 23:12:52 GMT
Accept: application/pkcs7-mime; text/plain
Disposition-notification-to: <>
Disposition-notification-options: signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1
Receipt-delivery-option:
Content-Type: Application/pkcs7-mime
Content-Length: 26726
0‚hb *†H†÷
<<<26726>>> of binary
}°Ù÷" µkÌ¢öäFØlø)OhjKUTStðÉqÒÃôù;ò5®{ã æ‡¼kÕ2Üï?ýëà(*»Ëö«=—?@Ì[½KlÙ ?;?àÅðÍüÖYâF
--------------Boundary-144574622.1290485831618@SYSQ--
[/tt]
Does anyone have any ideas how to do this?
Thanks in advance
My program downloads multipart/mime messages from a remote server and saves them to an Outlook email file (*.eml). I can open the email message in Outlook and view/process the attachments, however I want to automate this.
I want to be able to open the *.eml file in Binary mode and extract the binary content and ignore the email header information (which is in text). The "Content-Length" parameter of the email header tells me the amount of binary content to extract but I cannot determime the byte position of the BOF of the binary file. Here is an example of the message that I am trying to parse:
[tt]
--------------Boundary-144574622.1290485831618@SYSQ
MIME-Version: 1.0
From: <>
Message-Id: <13239313.69759121290467473014.JavaMail.>
Date: Mon, 22 Nov 2010 23:11:13 GMT
Accept: application/pkcs7-mime; text/plain
Disposition-notification-to: <>
Disposition-notification-options: signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1
Receipt-delivery-option:
Content-Type: Application/pkcs7-mime
Content-Length: 26718
0‚hZ *†H†÷
<<<26718 of binary>>>
È<Ø?§Ðû²- Æ?ía(LÒà0²+3ÌF°'6 }a°q!ÜNJRÜn=É!ÛÀZŸëNC
--------------Boundary-144574622.1290485831618@SYSQ
MIME-Version: 1.0
From: <>
Message-Id: <29295355.61553261290208372191.JavaMail.>
Date: Fri, 19 Nov 2010 23:12:52 GMT
Accept: application/pkcs7-mime; text/plain
Disposition-notification-to: <>
Disposition-notification-options: signed-receipt-protocol=required,pkcs7-signature; signed-receipt-micalg=required,sha1
Receipt-delivery-option:
Content-Type: Application/pkcs7-mime
Content-Length: 26726
0‚hb *†H†÷
<<<26726>>> of binary
}°Ù÷" µkÌ¢öäFØlø)OhjKUTStðÉqÒÃôù;ò5®{ã æ‡¼kÕ2Üï?ýëà(*»Ëö«=—?@Ì[½KlÙ ?;?àÅðÍüÖYâF
--------------Boundary-144574622.1290485831618@SYSQ--
[/tt]
Does anyone have any ideas how to do this?
Thanks in advance