From c7c95d0ebb0952ba7170d2edbb395bab9be88d5a Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Thu, 24 May 2001 17:37:40 +0000 Subject: [PATCH] add examples for SSL IMAP and POP3 servers, and correct server specs to be of form host:port/protocol (some of them were host/protocol:port). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@48556 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/imap.xml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/functions/imap.xml b/functions/imap.xml index cf212e9dae..1647a10a51 100644 --- a/functions/imap.xml +++ b/functions/imap.xml @@ -1913,9 +1913,9 @@ for($i=0;$i<count($elements);$i++) { A mailbox name consists of a server part and a mailbox path on this server. The special name INBOX stands for the current users personal mailbox. The server part, which is enclosed in '{' and - '}', consists of the servers name or ip address, a protocol - secification (beginning with '/') and an optional port specifier - beginnung with ':'. The server part is mandatory in all mailbox + '}', consists of the servers name or ip address, an optional port + (prefixed by ':'), and an optional protocol specification (prefixed + by '/'). The server part is mandatory in all mailbox parameters. Mailbox names that contain international characters besides those in the printable ASCII space have to be encoded with imap_utf7_encode. @@ -1958,13 +1958,27 @@ $mbox = imap_open ("{localhost:143}INBOX", "user_id", "password"); To connect to a POP3 server on port 110 on the local server, use: -$mbox = imap_open ("{localhost/pop3:110}INBOX", "user_id", "password"); +$mbox = imap_open ("{localhost:110/pop3}INBOX", "user_id", "password"); + + + To connect to an SSL IMAP or POP3 server, add /ssl after the protocol + specification: + + +$mbox = imap_open ("{localhost:993/imap/ssl}INBOX", "user_id", "password"); + + + To connect to an SSL IMAP or POP3 server with a self-signed + certificate, add /ssl/novalidate-cert after the protocol specification: + + +$mbox = imap_open ("{localhost:995/pop3/ssl/novalidate-cert}", "user_id", "password"); To connect to an NNTP server on port 119 on the local server, use: -$nntp = imap_open ("{localhost/nntp:119}comp.test", "", ""); +$nntp = imap_open ("{localhost:119/nntp}comp.test", "", ""); To connect to a remote server replace "localhost" with the name