RE: [PEAR-DEV] New Mail/Mime.php class
| From: | Rudi Benkoviè | Date: | Wed, 27 Jun 2001 07:44:02 +0000 |
| Subject: | RE: [PEAR-DEV] New Mail/Mime.php class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-497@lists.php.net to get a copy of this message | ||
> Perhaps I was not clear enough, I wanted to say: "choose you prefered PEAR
> transport method" :)
Oh, okay, since I remember using that original class and it had some weird end
transport jokes... PEAR's rule :)
> Umm, I didn't think on imap functions. I see now that some functions like
> imap_fetchstructure() and imap_fetchbody() do quite clean this task. Perhaps
> there is no need to implement it as a PEAR class. What do you think
> about that?
Have you looked at imap_fetchstructures() output? It's a threaded array, and it
must be parsed at least once to a flat one before you start outputting any
data...
> Do you find any advantage to have a front-end to theese functions?
A big one! It automatically finds any attachment descriptions, filenames, if the
message itself is an attachment (possible) it moves that into an attachment (as
it should), does MIME decoding of subject, From/To/CC addresses,... Lots of
stuff that is highly reusable!
And it's about ~10k, so I'd say that it's reusable :)
Of course, then it comes to parsing the body (html or text ones) and attachments
(RPMs to text, tar.gz outputs,...) which I think are more app-specific and
shouldn't be in PEAR... Or am I wrong?