Downloading Attachment as Part of the Email Message
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chinh_Nguyen
Posted On:   Monday, October 1, 2001 10:59 AM

I am implementing a server-side application which downloads users's mail (using Javamail 1.2) and performs some formatting on the mail, such as: stripping/leaving certain type of attachments, remove html tags, splitting long text messages into multiple pieces, etc... The mail is placed into a temporary location on the server where the users would come back with a POP session to download the processed messages. I ran into some difficulty when handling attachments (ie, leaving certain types of attachments with the message but stripping off other types of attachments). In order to write attachments as part of the message, it seems I would have to maintain the header info for each parts (Content-Type, Content_Transfer_Encoding, Boundary, etc...).    More>>

I am implementing a server-side application which downloads users's mail (using Javamail 1.2) and performs some formatting on the mail, such as: stripping/leaving certain type of attachments, remove html tags, splitting long text messages into multiple pieces, etc... The mail is placed into a temporary location on the server where the users would come back with a POP session to download the processed messages.

I ran into some difficulty when handling attachments (ie, leaving certain types of attachments with the message but stripping off other types of attachments). In order to write attachments as part of the message, it seems I would have to maintain the header info for each parts (Content-Type, Content_Transfer_Encoding, Boundary, etc...). This could be complicated since a message can be nested, multiple parts, with each part is itself multiple part. The boundary info could be nested.

Is it possible to download these attachments along with the message without having to maintain the original structure of the message (with all the header and boundary)? Or is it possible to download the attachment into separated files but somehow tie it back to the original email message?

Thanks for any suggestion.
Chinh

   <<Less
About | Sitemap | Contact