Re: Imap Backend Propsal

From: Date: Mon, 02 Feb 2004 14:31:19 +0000
Subject: Re: Imap Backend Propsal
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25419@lists.php.net to get a copy of this message
<c.groenendal@campai.nl> wrote : >>> Also, I don't see the point to call your methods imapSomething. Just get > rid of the imap >>> prefix and we might be able to later have a Mail_POP3 class with the same > API. >> --This class mostly just wraps IMAP functions, thus I thought it helpful > to name the >> functions after what they were wrapping. But again, point taken. > Abstraction is >> always good! > I've written my own webmail client with similar functions in the backend as > this class proposes, and as such, I'm highly interrested in it. > As you may or may not know, PHP's imap module can connect to IMAP, POP and > NNTP via the same functions. Even the data returned will be nearly > identical. There will be no need at all for a seperate Mail_POP3 class, > since the Mail_IMAP package will access it just as easily as it would with > IMAP. That said, I agree with Bertrand about the class name and function > names. I'd suggest calling it Mail_Message, since it deals with parsing and > reading of a message. > > Also, would it be possible to make the connecting to the server optional? I > can see this class, as a seperate Mail_message parser being extremely > helpfull in other scenarios such as parsing an email saved as a .eml file, > parsing mail directly from a database or handling cached messages. It would > also make it easier to implement the package in already existing > environments. > > Another question I've had since reading this thread, where did you get the > information you're using on parsing the messageparts, and others? I'm > assuming that you, like me, started from scratch comparing to other clients > and see if it'd end up with similar results? I know I've spend hours on > perfecting the subpart matching algorithms, but found them alas to end up > way to inefficient to ever dare show them to anyone else;) > > Also, let me know if you could use any help with this, I've had enough > experience with the imap_* functions to know I don't wanna have to deal with > them ever again ;) There has already have some work done by Wolfram Kriesing on a Mail_Message class for PEAR but it unfortunately does not use the imap extension: http://opensource.visionp.biz/120.html You might be interested in having a look at that too. Personally, I think it is incomplete and relies too much on Net_POP3 and sockets at the moment. But the approach is interesting as it could be generalized. And I don't like the get/set...() methods, it should use overloading to be more flexible. Apart from that, I am totally pro having a Mail_Message package, as you suggested, in PEAR. I can help in testing and fixing bugs but I don't have the time to write it from the ground up, so someone has to start somewhere... Will it be you, Richard and/or Wolfram ? Can you coordinate your efforts ? That's the question ;) Bertrand Mansion Mamasam

« previous php.pear.dev (#25419) next »