cvs: phpdoc /en/reference/imap/functions imap-open.xml
| From: | Jakub Vrana | Date: | Sat, 07 Aug 2004 08:02:26 +0000 |
| Subject: | cvs: phpdoc /en/reference/imap/functions imap-open.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969362809@lists.php.net to get a copy of this message | ||
vrana Sat Aug 7 04:02:26 2004 EDT
Modified files:
/phpdoc/en/reference/imap/functions imap-open.xml
Log:
Document flags (bug #27017), add all options, compress examples
http://cvs.php.net/diff.php/phpdoc/en/reference/imap/functions/imap-open.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/imap/functions/imap-open.xml diff -u phpdoc/en/reference/imap/functions/imap-open.xml:1.7 phpdoc/en/reference/imap/functions/imap-open.xml:1.8 --- phpdoc/en/reference/imap/functions/imap-open.xml:1.7 Mon Mar 8 04:18:43 2004 +++ phpdoc/en/reference/imap/functions/imap-open.xml Sat Aug 7 04:02:25 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 --> <refentry id="function.imap-open"> <refnamediv> @@ -33,6 +33,123 @@ with <function>imap_utf7_encode</function>. </para> <para> + All names which start with <literal>{</literal> are remote names, and are + in the form <literal>"{" remote_system_name [":" port] [flags] "}" + [mailbox_name]</literal> where: + <itemizedlist> + <listitem> + <simpara> + <literal>remote_system_name</literal> - Internet domain name or + bracketed IP address of server. + </simpara> + </listitem> + <listitem> + <simpara> + <literal>port</literal> - optional TCP port number, default is the + default port for that service + </simpara> + </listitem> + <listitem> + <simpara> + <literal>flags</literal> - optional flags, see following table. + </simpara> + </listitem> + <listitem> + <simpara> + <literal>mailbox_name</literal> - remote mailbox name, default is INBOX + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + <table> + <title>Optional flags for names</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Flag</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>/service=</literal><emphasis>service</emphasis></entry> + <entry>mailbox access service, default is "imap"</entry> + </row> + <row> + <entry><literal>/user=</literal><emphasis>user</emphasis></entry> + <entry>remote user name for login on the server</entry> + </row> + <row> + <entry><literal>/authuser=</literal><emphasis>user</emphasis></entry> + <entry>remote authentication user; if specified this is the user name + whose password is used (e.g. administrator)</entry> + </row> + <row> + <entry><literal>/anonymous</literal></entry> + <entry>remote access as anonymous user</entry> + </row> + <row> + <entry><literal>/debug</literal></entry> + <entry>record protocol telemetry in application's debug log</entry> + </row> + <row> + <entry><literal>/secure</literal></entry> + <entry>do not transmit a plaintext password over the network</entry> + </row> + <row> + <entry><literal>/imap</literal>, <literal>/imap2</literal>, + <literal>/imap2bis</literal>, <literal>/imap4</literal>, + <literal>/imap4rev1</literal></entry> + <entry>equivalent to /service=imap</entry> + </row> + <row> + <entry><literal>/pop3</literal></entry> + <entry>equivalent to /service=pop3</entry> + </row> + <row> + <entry><literal>/nntp</literal></entry> + <entry>equivalent to /service=nntp</entry> + </row> + <row> + <entry><literal>/norsh</literal></entry> + <entry>do not use rsh or ssh to establish a preauthenticated IMAP + session</entry> + </row> + <row> + <entry><literal>/ssl</literal></entry> + <entry>use the Secure Socket Layer to encrypt the session</entry> + </row> + <row> + <entry><literal>/validate-cert</literal></entry> + <entry>validate certificates from TLS/SSL server (this is the default + behavior)</entry> + </row> + <row> + <entry><literal>/novalidate-cert</literal></entry> + <entry>do not validate certificates from TLS/SSL server, needed if + server uses self-signed certificates</entry> + </row> + <row> + <entry><literal>/tls</literal></entry> + <entry>force use of start-TLS to encrypt the session, and reject + connection to servers that do not support it</entry> + </row> + <row> + <entry><literal>/notls</literal></entry> + <entry>do not do start-TLS to encrypt the session, even with servers + that support it</entry> + </row> + <row> + <entry><literal>/readonly</literal></entry> + <entry>request read-only mailbox open (IMAP only; ignored on NNTP, and + an error with SMTP and POP3)</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <para> The <parameter>options</parameter> are a bit mask with one or more of the following: <itemizedlist> <listitem> @@ -59,65 +176,68 @@ <function>imap_expunge</function>) </simpara> </listitem> + <listitem> + <simpara> + <constant>OP_DEBUG</constant> - Debug protocol negotiations + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SHORTCACHE</constant> - Short (elt-only) caching + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SILENT</constant> - Don't pass up events (internal use) + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_PROTOTYPE</constant> - Return driver prototype + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_EXPUNGE</constant> - Silently expunge recycle stream + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SECURE</constant> - Don't do non-secure authentication + </simpara> + </listitem> </itemizedlist> </para> <para> - To connect to an IMAP server running on port 143 on the - local machine, do the following: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php -$mbox = imap_open("{localhost:143}INBOX", "user_id", "password"); -?> -]]> - </programlisting> - </informalexample> - To connect to a POP3 server on port 110 on the local server, use: - <informalexample> + <example> + <title>Different use of <function>imap_open</function></title> <programlisting role="php"> <![CDATA[ <?php +// To connect to an IMAP server running on port 143 on the local machine, +// do the following: +$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:110/pop3}INBOX", "user_id", "password"); -?> -]]> - </programlisting> - </informalexample> - To connect to an SSL IMAP or POP3 server, add /ssl after the protocol - specification: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// 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"); -?> -]]> - </programlisting> - </informalexample> - To connect to an SSL IMAP or POP3 server with a self-signed - certificate, add /ssl/novalidate-cert after the protocol specification: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// 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"); -?> -]]> - </programlisting> - </informalexample> - To connect to an NNTP server on port 119 on the local server, use: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// To connect to an NNTP server on port 119 on the local server, use: $nntp = imap_open ("{localhost:119/nntp}comp.test", "", ""); +// To connect to a remote server replace "localhost" with the name or the +// IP address of the server you want to connect to. ?> ]]> </programlisting> - </informalexample> - To connect to a remote server replace "localhost" with the name - or the IP address of the server you want to connect to. - </para> + </example> + </para> <para> <example> <title><function>imap_open</function> example</title>
http://cvs.php.net/diff.php/phpdoc/en/reference/imap/functions/imap-open.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/imap/functions/imap-open.xml diff -u phpdoc/en/reference/imap/functions/imap-open.xml:1.7 phpdoc/en/reference/imap/functions/imap-open.xml:1.8 --- phpdoc/en/reference/imap/functions/imap-open.xml:1.7 Mon Mar 8 04:18:43 2004 +++ phpdoc/en/reference/imap/functions/imap-open.xml Sat Aug 7 04:02:25 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 --> <refentry id="function.imap-open"> <refnamediv> @@ -33,6 +33,123 @@ with <function>imap_utf7_encode</function>. </para> <para> + All names which start with <literal>{</literal> are remote names, and are + in the form <literal>"{" remote_system_name [":" port] [flags] "}" + [mailbox_name]</literal> where: + <itemizedlist> + <listitem> + <simpara> + <literal>remote_system_name</literal> - Internet domain name or + bracketed IP address of server. + </simpara> + </listitem> + <listitem> + <simpara> + <literal>port</literal> - optional TCP port number, default is the + default port for that service + </simpara> + </listitem> + <listitem> + <simpara> + <literal>flags</literal> - optional flags, see following table. + </simpara> + </listitem> + <listitem> + <simpara> + <literal>mailbox_name</literal> - remote mailbox name, default is INBOX + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + <table> + <title>Optional flags for names</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Flag</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>/service=</literal><emphasis>service</emphasis></entry> + <entry>mailbox access service, default is "imap"</entry> + </row> + <row> + <entry><literal>/user=</literal><emphasis>user</emphasis></entry> + <entry>remote user name for login on the server</entry> + </row> + <row> + <entry><literal>/authuser=</literal><emphasis>user</emphasis></entry> + <entry>remote authentication user; if specified this is the user name + whose password is used (e.g. administrator)</entry> + </row> + <row> + <entry><literal>/anonymous</literal></entry> + <entry>remote access as anonymous user</entry> + </row> + <row> + <entry><literal>/debug</literal></entry> + <entry>record protocol telemetry in application's debug log</entry> + </row> + <row> + <entry><literal>/secure</literal></entry> + <entry>do not transmit a plaintext password over the network</entry> + </row> + <row> + <entry><literal>/imap</literal>, <literal>/imap2</literal>, + <literal>/imap2bis</literal>, <literal>/imap4</literal>, + <literal>/imap4rev1</literal></entry> + <entry>equivalent to /service=imap</entry> + </row> + <row> + <entry><literal>/pop3</literal></entry> + <entry>equivalent to /service=pop3</entry> + </row> + <row> + <entry><literal>/nntp</literal></entry> + <entry>equivalent to /service=nntp</entry> + </row> + <row> + <entry><literal>/norsh</literal></entry> + <entry>do not use rsh or ssh to establish a preauthenticated IMAP + session</entry> + </row> + <row> + <entry><literal>/ssl</literal></entry> + <entry>use the Secure Socket Layer to encrypt the session</entry> + </row> + <row> + <entry><literal>/validate-cert</literal></entry> + <entry>validate certificates from TLS/SSL server (this is the default + behavior)</entry> + </row> + <row> + <entry><literal>/novalidate-cert</literal></entry> + <entry>do not validate certificates from TLS/SSL server, needed if + server uses self-signed certificates</entry> + </row> + <row> + <entry><literal>/tls</literal></entry> + <entry>force use of start-TLS to encrypt the session, and reject + connection to servers that do not support it</entry> + </row> + <row> + <entry><literal>/notls</literal></entry> + <entry>do not do start-TLS to encrypt the session, even with servers + that support it</entry> + </row> + <row> + <entry><literal>/readonly</literal></entry> + <entry>request read-only mailbox open (IMAP only; ignored on NNTP, and + an error with SMTP and POP3)</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <para> The <parameter>options</parameter> are a bit mask with one or more of the following: <itemizedlist> <listitem> @@ -59,65 +176,68 @@ <function>imap_expunge</function>) </simpara> </listitem> + <listitem> + <simpara> + <constant>OP_DEBUG</constant> - Debug protocol negotiations + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SHORTCACHE</constant> - Short (elt-only) caching + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SILENT</constant> - Don't pass up events (internal use) + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_PROTOTYPE</constant> - Return driver prototype + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_EXPUNGE</constant> - Silently expunge recycle stream + </simpara> + </listitem> + <listitem> + <simpara> + <constant>OP_SECURE</constant> - Don't do non-secure authentication + </simpara> + </listitem> </itemizedlist> </para> <para> - To connect to an IMAP server running on port 143 on the - local machine, do the following: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php -$mbox = imap_open("{localhost:143}INBOX", "user_id", "password"); -?> -]]> - </programlisting> - </informalexample> - To connect to a POP3 server on port 110 on the local server, use: - <informalexample> + <example> + <title>Different use of <function>imap_open</function></title> <programlisting role="php"> <![CDATA[ <?php +// To connect to an IMAP server running on port 143 on the local machine, +// do the following: +$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:110/pop3}INBOX", "user_id", "password"); -?> -]]> - </programlisting> - </informalexample> - To connect to an SSL IMAP or POP3 server, add /ssl after the protocol - specification: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// 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"); -?> -]]> - </programlisting> - </informalexample> - To connect to an SSL IMAP or POP3 server with a self-signed - certificate, add /ssl/novalidate-cert after the protocol specification: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// 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"); -?> -]]> - </programlisting> - </informalexample> - To connect to an NNTP server on port 119 on the local server, use: - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php + +// To connect to an NNTP server on port 119 on the local server, use: $nntp = imap_open ("{localhost:119/nntp}comp.test", "", ""); +// To connect to a remote server replace "localhost" with the name or the +// IP address of the server you want to connect to. ?> ]]> </programlisting> - </informalexample> - To connect to a remote server replace "localhost" with the name - or the IP address of the server you want to connect to. - </para> + </example> + </para> <para> <example> <title><function>imap_open</function> example</title>