Re: Imap Backend Propsal

From: Date: Thu, 29 Jan 2004 12:23:03 +0000
Subject: Re: Imap Backend Propsal
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25330@lists.php.net to get a copy of this message
<wentz@gmx.de> wrote : > Bertrand Mansion wrote: > >> <neufeind@speedpartner.de> wrote : >> >> >>> Hi Richard, >>> >>> please excuse, I didn't have time to go through all the details you >>> mentioned. >>> But have you had a look at Net_IMAP and how your feature-ideas could maybe >>> be >>> integrated into it? I'm almost certain most people on this list will agree >>> that >>> we should try to avoid another IMAP-class if possible. Maybe write Damian >>> (the >>> lead of Net_IMAP) a private email explaining in short (!) your ideas and how >>> they might be incorporated into the current package. >> >> >> Net_Imap does not use the imap extension, it uses Net_Socket instead, which >> makes it a) really slow, b) unstable. And useless in my case where >> performance and reliability matters. >> >> Furthermore, Net_Imap isn't thought as an helper for common imap handling >> tasks, but more as a connection and command sender. I would call Net_Imap an >> emulator class. The proposed Mail_Imap (BTW, I prefer Mail_Imap to >> Mail_ImapMailbox) is really an helper in the sense that Mail_Mime is an >> helper too. I makes common tasks easier to achieve. >> >> In conclusion, there is IMO a place for such a package in PEAR. > > maybe switch Net_IMAP to using a backend-interface? > both socket und imap-extensions could be added as backends, without > breaking BC. Before we continue this discussion, I suggest you have a deeper look at the code in order to figure out what this class does compared to what other Net classes using Net_Socket do. Personally, I have used the imap extension quite a lot, as well as Net_Pop3, the Horde framework parts related to mail (MIME, MIME_Structure, ...) and the mailparse extension. I can tell that I see a real benefit for this class even if it can be improved with time. The closest thing it compares to are the Horde mail libs but they are a bit complex to use/adapt outside of the Horde framework. At the moment, the best way to parse an email and get its content is mailparse as it is very fast and nice with memory issues. But it doesn't provide a way to connect to a server, which the imap extension does, and it is still experimental. Mail_Imap would be the solution. Now, adding support for the imap extension to Net_Imap would definitely be a good thing, but that's another story. It's not Net_Imap business to tell you if there are attachments in your mail, which encoding was used, what is the sender address and so on. I think that moving the connection stuff from Mail_Imap to Net_Imap is not possible as Mail_Imap requires the imap extension while Net_Imap can be used without. Bertrand Mansion Mamasam

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