Re: [PHP-DEV] IMAP and the mail_parameters

2001-02-15 Thread Chuck Hagenbuch

Quoting Dan Kalowsky <[EMAIL PROTECTED]>:

>   The implementation of a universal function could potentially be
> extremely useful for controlling imap services.  But some advise on this
> would be welcome... or if there currently is such an ability that would
> be great to hear!  So.. any preference?

The other problem with universal is that what you get back from mail_parameters 
depends on what you're doing with it. For instance, if I remember correctly, 
calling mail_parameters to ask for NAMESPACE gives you back a funky data 
structure that c-client uses to define namespaces, while most things give you 
just an int return value.

So maybe we should have specialized functions, though universal would be great 
if we could manage it. The NAMESPACE example isn't incidental; we really should 
have access to that from php-space. I just haven't gotten around to 
implementing it yet. So if you want a hand with any of this, feel free to let 
me know.

-chuck

--
Charles Hagenbuch, <[EMAIL PROTECTED]>
"We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] IMAP and the mail_parameters

2001-02-15 Thread Dan Kalowsky

Hi,

  Recently came across a need for the ability to set quotas via the PHP
IMAP interface.  Currently it doesn't seem as if this is capable of
happening, so I've started looking into adding a bit of functionality.

  It seems that the c-client library has a function
mail_parameters(MAILSTREAM *stream, long function, void *value) function
that can accomplish this, where 'function' is the command you want
(defined in mail.h)

  The question becomes would this, would adding in a 'imap_parameters()'
function to PHP be advisable, leaving it open to extend to all of the
mail_parameter functions?  Or would it be better to just implement a
imap_setquota() function to handle what I need?

  The only big problem I can see with implementing a imap_parameter()
function is the lack of functionality documentation/support.  For
example, in the imap-2000c.tar dist, there are mentions of a
SET_RSHTIMEOUT including a mention in the mail.h file, but there is no
implementation in the mail_parameter function to handle such a flag. 
More so the 'value' to be passed into the function isn't always
defined/documented. 

  The disadvantage I see with just a imap_setquota function is if other
functionality is needed it would require re-implementing the function. 
The internals would be the same except for one variable (that could be a
possible parameter by the user) deciding what functionality to call.

  The implementation of a universal function could potentially be
extremely useful for controlling imap services.  But some advise on this
would be welcome... or if there currently is such an ability that would
be great to hear!  So.. any preference?

And yes, I'm planning on submitting all changes back to the project...


-- 
Dan Kalowsky  "Tonight I think I'll walk alone, 
Worldgate Communications   I'll find my soul as I go home."
Software Engineer - TICS Group  - Temptation

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]