MIME encoded attachments
Keary Suska
aksuska at insideflyer.com
Wed Aug 9 16:35:08 CDT 2000
As Vance indicated, extracting MIME parts is fairly straightforward, since
you would just look for the boundary string. The complexities involve
dealing with the different MIME content-types and how to handle them. Not
all MIME parts are attachments, as they could be an HTML version of the
email, as version in a different language, etc. It's been a while since I
have looked at the MIME modules, but I am pretty sure the recent versions
handle almost every encoding/decoding method and can easily extract
different parts. Depending on what the agent is designed to do, you may be
able to ignore many content-types, but beware that not all MTA's properly
conform to the MIME 1.0 standard.
Regards,
Keary Suska
Mgr., Information Technologies
Frequent Flyer Services
http://www.webflyer.com/
mailto: aksuska at webflyer.com
(719) 597-8899 x737
(719) 597-6855 (fax)
> From: Vance Dubberly <vance at coloradosprings.com>
> Date: Wed, 09 Aug 2000 14:53:29 -0600
> To: Pikes-Peak Perl Mongers <pikes-peak-pm-list at happyfunball.pm.org>
> Subject: Re: MIME encoded attachments
>
> John,
> Mail attachements are usually uuencoded, sometimes base64, if you read
> mail using elm or mail or whatever program you'll see attachments are just a
> long series of rows of ascii text actually embedded in the email message.
> What I've done in the past is parse the email looking for the boundaries (
> "Content-Type: multipart/mixed" boundary="some_ugly_string") pulled out the
> encoded part, written it to a file and then used either a system call or
> Convert::UU to decode the file.
>
> -v
>
> on 8/9/00 1:04 PM, John Evans at evansj at kilnar.com wrote:
>
>> I finally talked my boss into letting me do a little Perl for a large
>> project. It's a small bit, but at least it's a start. Anyway...
>>
>> What I'm doing is using Mail::POP3Client to log into a POP3 server and
>> slurp off emails with attachments. Those attachments are MIME encoded so I
>> figure I'll use the MIME::Tools modules to decode the attachments.
>>
>> The documentation (perldoc) is pretty convoluted (is MIME really that
>> complex?) and I was wondering if anyone had other documentation that they
>> could refer me to for MIME stuff or if they had done something like this
>> themselves.
>>
>> Any input or insight would be great.
>>
>> Thanks!
>
> Vance Dubberly
> Director of Application Development
> ColoradoSprings.com - WOW! Marketing
> Freedom Interactive Media of Colorado, Inc.
> 219 W Colorado, Suite 204
> Colorado Springs, Colorado 80918
> 719.577.4848 x101
> ---------------------------------------
> It really doesn't get any easier than this and it all
> starts right here at ColoradoSprings.com
> the hottest jobs around town,
> what's going on in your neighborhood,
> the get it all mall, your new wheels,
> your next house and so much more...
> all in one place!
> If it's local - it's on ColoradoSprings.com!
>
> ---------------------------------------
> ColoradoSprings.com, your local homepage, includes
> AUTOfinder, BUSINESSfinder, Digital Village, Get it
> All Mall, HOMEfinder, PEAKlinks.com and WorkAvenue.
> Great places to shop and find local information!
> ----------------------------------------
> http://ColoradoSprings.com
> http://Gazette.com
> http://WOWMarketing.com
> ------------------------------------------------------
> One of the symptoms of approaching nervous breakdown
> is the belief that one's work is terribly important.
> If I were a medical man, I should prescribe a holiday
> to any patient who considered his work important.
>
> Bertrand Russell
> ------------------------------------------------------
>
More information about the Pikes-peak-pm
mailing list