Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Compress email attachments

by luckypower (Beadle)
on Sep 26, 2008 at 09:53 UTC ( #713841=note: print w/replies, xml ) Need Help??


in reply to Re: Compress email attachments
in thread Compress email attachments

Thanks..
I am aware of these things....
but i don't know from where to start.
suppose the mail has following structure
1 (mail)
1.1 (jpg file)
1.2 (another mail so it has its own header)
1.2.1 (application)
1.2.2 (video)
...

so here i have to decode first msg. then second msg(1.2) to get its attachments.
now compress attachments put them back in second msg and again put the second msg in 1st msg...
so can i decode msgs n create files or something else..??

Replies are listed 'Best First'.
Re^3: Compress email attachments
by broomduster (Priest) on Sep 26, 2008 at 10:21 UTC
    If I understand this correctly, what you have is an email message with multiple MIME parts. Some of those parts are other email messages that also have MIME attachments. This is what the tools in MIME-tools (e.g., MIME::Parser) are designed to deal with.

    May I suggest that you start with something simple? Start with a message that has a single attachment. Write some test code that does what you want (extract the attachment, compress it, re-construct a properly formatted message). Then work up to more complicated schemes like the one you show here.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://713841]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2018-07-21 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (443 votes). Check out past polls.

    Notices?