Mail_Mbox

From: Date: Fri, 27 Dec 2002 20:23:55 +0000
Subject: Mail_Mbox
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11841@lists.php.net to get a copy of this message
Hi all, Its my first message on this list. I wished to say a happy hollyday, but I am late :-) I developed a Mbox parse class that read messages, change, add and delete from a mbox file. You can download it from http://opensource.under.com.br/Mail_Mbox/Mail_Mbox-0.1.0.tgz I am copy&past its methods: * int resource mbox->open(string file) * open a mbox and return a resource id * * bool mbox->close(resource) * close a mbox resource id * * int mbox->size(resource) * return mbox number of messages * * string mbox->get(int resource,messageNumber) * return the message number of the resource * * bool mbox->update(int resource,int messageNumber,string message) * update the message offset to message (need write permission) * * bool mbox->delete(int resource,int messageNumber) * remove the message messageNumber (need write permission) * * bool mbox->insert(int resource,string message[,$offset = null]) * add message to the end of the mbox. Offset == 0 message will be append at first message. If after == null will be the last one message. * (need write permission) I was builting everything to do not use more than 1 byte of memory per time when working on messages, but on update, delete and insert I did something fast to finished it, so, it is working with a full message per time on the memory. Next releases will use byte per byte on everything. I would like to now if you approve it and If I can request a PEAR account to send the class to the repository. There are an example included on the mbox_test.php Thank you for your feedback! -- Roberto Bertó <roberto@desenvolve.com.br> Desenvolve Solucões de Internet

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