Re: MIME E-mail message

From: Date: Wed, 14 Dec 2005 20:12:36 +0000
Subject: Re: MIME E-mail message
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227436@lists.php.net to get a copy of this message
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


« previous php.general (#227436) next »