cvs: phpdoc /en/reference/mail/functions mail.xml

From: Date: Wed, 14 May 2003 06:11:49 +0000
Subject: cvs: phpdoc /en/reference/mail/functions mail.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969353437@lists.php.net to get a copy of this message
philip Wed May 14 02:11:49 2003 EDT Modified files: /phpdoc/en/reference/mail/functions mail.xml Log: Examples now work with register_globals = off, and added <?php ?>. Index: phpdoc/en/reference/mail/functions/mail.xml diff -u phpdoc/en/reference/mail/functions/mail.xml:1.16 phpdoc/en/reference/mail/functions/mail.xml:1.17 --- phpdoc/en/reference/mail/functions/mail.xml:1.16 Wed May 7 17:31:30 2003 +++ phpdoc/en/reference/mail/functions/mail.xml Wed May 14 02:11:49 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> +<!-- $Revision: 1.17 $ --> <!-- splitted from ./en/functions/mail.xml, last change in rev 1.2 --> <refentry id="function.mail"> <refnamediv> @@ -63,7 +63,9 @@ <title>Sending mail.</title> <programlisting> <![CDATA[ +<?php mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3"); +?> ]]> </programlisting> </example> @@ -86,10 +88,12 @@ <title>Sending mail with extra headers.</title> <programlisting> <![CDATA[ +<?php mail("nobody@example.com", "the subject", $message, - "From: webmaster@$SERVER_NAME\r\n" - ."Reply-To: webmaster@$SERVER_NAME\r\n" + "From: webmaster@{$_SERVER['SERVER_NAME']}\r\n" + ."Reply-To: webmaster@{$_SERVER['SERVER_NAME']}\r\n" ."X-Mailer: PHP/" . phpversion()); +?> ]]> </programlisting> </example> @@ -108,8 +112,10 @@ <title>Sending mail with extra headers and setting an additional command line parameter.</title> <programlisting> <![CDATA[ +<?php mail("nobody@example.com", "the subject", $message, - "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVER_NAME"); + "From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}"); +?> ]]> </programlisting> </example> @@ -129,6 +135,7 @@ <title>Sending complex email.</title> <programlisting> <![CDATA[ +<?php /* recipients */ $to = "Mary <mary@example.com>" . ", " ; // note the comma $to .= "Kelly <kelly@example.com>"; @@ -171,6 +178,7 @@ /* and now mail it */ mail($to, $subject, $message, $headers); +?> ]]> </programlisting> </example>

« previous php.doc (#969353437) next »