Amos wrote:
>>> there is an image attachment but without a filename
>>> how can i extract such attachment?
>>
>> This was discussed earlier (not in context of images, but different
>> unnamed blocks of email, I recall).
>>
>> If you don't know a name, invent one. If you wish to store the
>> attachment into a file, you might as well ask the user under which
>> name
>> s/he wishes to save it and provide the filename from the message (if
>> present) as the default.
>
> ok
> but how can i know this is an attachment?
> usually there is a indication that this is an attachment (dont
> remember the property at the moment)

First I need to issue a word of warning; I'm writing this from memory,
so it should be taken with a grain of salt (meaning that I might be
totally off the track)...

MIME-protocol has a header Content-Disposition. It has the possible
values of "inline" or "attachment". Obviously, the parts that are marked
as "attachment" are attachments. Furthermore, the parts that are marked
"inline" are supposedly displayed inline (as parts of the message;
images in HTML-mailing, etc.). Such parts should also have a Content-Id,
by which other parts can link to it. For inline attachments however,
this header is normally not present.

I usually do the following:

Content-Disposition: Attachment => It's an attachment
Content-Disposition: inline *and* Content-Id => It's not an attachment
Content-Disposition: inline *without* Content-Id => It might as well be
an attachment
Neither => If it's not plaintext or HTML, I consider it an attachment

Your mileage may vary... greatly :)

-- 
Markku Uttula


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to