|
Posted by "M. Sokolewicz" on 10/21/56 11:34
hi,
Oli Howson wrote:
> I'm working on a private webmail (and other) system, and am struggling a
> little with MIME mails. I've got a script to save all the attachments, but
> the thing I can't figure out is how I decide which "part" is the main email
> message itself (and hence which to display).
Usually, the main part of the message, is the first non-attachment part
you find. So, if you have a tree like
mime1
|- text
|- mime2
|- attachment
|- another text (possibly mime3)
then the main part is text. Otherwise, just look for the first
text/plain or text/html mime-section you can find in the list (closest
to the top). If both a text/plain and a text/html section appear on the
same level, your script will need to decide which one to show (a lot of
mailers attach both a plain-text copy and an html copy of the text)
> Oh and cheers for the info someone gave me the other day, it inspired me to
> just connect to the pop3 server using a raw socket, SOOOOO much easier!!!
share the code please, I'm interested :)
> Cheers
>
> Oli
>
Navigation:
[Reply to this message]
|