php and cyrus
Simon Matter
simon.matter at ch.sauter-bc.com
Tue Nov 26 09:59:20 EST 2002
Gregory Chagnon schrieb:
>
> Hi again-
> Thanks for all the suggestions, but everything that I've tried results in
> this error, obviously the 2nd and 3rd errors are a result from the 1st one:
IIRC there was something with the connection string. You may try
something like 192.168.1.200:143/notls
Simon
>
> Warning: Couldn't open stream {192.168.1.200:143} in
> /var/www/html/user/mail2.php on line 42
>
> Warning: imap_listmailbox(): supplied argument is not a valid imap resource
> in /var/www/html/user/mail2.php on line 55
>
> Warning: imap_createmailbox(): supplied argument is not a valid imap
> resource in /var/www/html/user/mail2.php on line 61
>
> >From: Kendrick Vargas <ken at hudat.com>
> >To: Gregory Chagnon <gregchagnon at hotmail.com>
> >CC: info-cyrus at lists.andrew.cmu.edu
> >Subject: Re: php and cyrus
> >Date: Mon, 25 Nov 2002 21:47:35 -0500 (EST)
> >
> >Here's a small attachment you can use as an include file. You can use it
> >as such from PHP:
> >
> >$server = new IMAP_Server();
> >$server->createMailbox("user.whatever");
> >$server->deleteMailbox("user.whatever");
> >
> >Both functions return true or false on success or failure (respectively).
> >You can edit the file and set the proper variables, or you can pass them
> >in when you create the object.
> > -peace
> >
> >On Mon, 25 Nov 2002, Gregory Chagnon wrote:
> >
> > > Hi-
> > > I tried something like that before, but I get this error:
> > >
> > > Warning: Couldn't open stream {192.168.1.200} in
> > > /var/www/html/user/mail2.php on line 7
> > >
> > > Any ideas? Thanks all.
> > > -Greg
> > >
> > >
> > >
> > >
> > >
> > >
> > > >From: Veigar Freyr Jökulsson <veigar at tviund.is>
> > > >To: "Gregory Chagnon"
> > > ><gregchagnon at hotmail.com>,<info-cyrus at lists.andrew.cmu.edu>
> > > >Subject: Re: php and cyrus
> > > >Date: Tue, 26 Nov 2002 00:40:42 -0000
> > > >
> > > > > Hi-
> > > > > Does anyone know if there is a way to create a cyrus user and
> >mailboxes
> > > > > through php? I've looked around at imap_createmailbox() but am
> >unlcear
> > > >on
> > > > > how to use it. Thanks!!
> > > > > -Greg
> > > > >
> > > >
> > > >You could do something like this, $uid is the login name you want to
> > > >create:
> > > >
> > > > $IMAPhost = "123.123.123.123";
> > > > $IMAPquota = "10240",
> > > > $username = "cyrus";
> > > > $password = "password";
> > > > $imapconn = imap_open("{" . $IMAPhost . "}", "$username",
> > > >"$password",OP_HALFOPEN);
> > > > if ($imapconn) {
> > > > imap_createmailbox($imapconn, "{" . $IMAPhost .
> > > >"}user.".$uid ) or die("can't connect: ".imap_last_error());
> > > > imap_set_quota($imapconn, "user.$uid", $IMAPquota) or
> > > >die("can't connect: ".imap_last_error());
> > > > imap_close($imapconn);
> > > > }
> > > >
> > > >
> > > >--
> > > >Veigar Freyr Jökulsson
> > > >veigar at tviund.is
> > >
> > >
> > > _________________________________________________________________
> > > Tired of spam? Get advanced junk mail protection with MSN 8.
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> >
> >--
> >Let he who is without clue kiss my ass
> ><< IMAP_Classes.inc >>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
More information about the Info-cyrus
mailing list