cvs: phpdoc /en/functions mail.xml

From: Date: Wed, 31 Oct 2001 22:45:44 +0000
Subject: cvs: phpdoc /en/functions mail.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969338396@lists.php.net to get a copy of this message
jimw Wed Oct 31 17:45:44 2001 EDT Modified files: /phpdoc/en/functions mail.xml Log: some reformatting, use example.com for example email addresses. (now i know where all those stupid messages bouncing off birthday@php.net came from.) Index: phpdoc/en/functions/mail.xml diff -u phpdoc/en/functions/mail.xml:1.29 phpdoc/en/functions/mail.xml:1.30 --- phpdoc/en/functions/mail.xml:1.29 Wed Oct 10 16:58:09 2001 +++ phpdoc/en/functions/mail.xml Wed Oct 31 17:45:43 2001 @@ -1,5 +1,5 @@ <?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.29 $ --> +<!-- $Revision: 1.30 $ --> <reference id="ref.mail"> <title>Mail functions</title> <titleabbrev>Mail</titleabbrev> @@ -41,18 +41,17 @@ accomplished via MIME-encoding - for more information, see <ulink url="http://www.zend.com/zend/spotlight/sendmimeemailpart1.php" >>http://www.zend.com/zend/spotlight/sendmimeemailpart1.php</ulink> >or - RFC 1896 (Visit <ulink url="http://www.rfc-editor.org/" - >http://www.rfc-editor.org/</ulink>). + <ulink url="&url.rfc1896;">RFC 1896</ulink>). </simpara> <para> <function>mail</function> returns &true; if the mail - is sucessfully sent, &false; otherwise. + is successfully sent, &false; otherwise. </para> <para> <example> <title>Sending mail.</title> <programlisting> -mail("rasmus@lerdorf.on.ca", "My Subject", "Line 1\nLine 2\nLine 3"); +mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3"); </programlisting> </example></para> <simpara> @@ -77,16 +76,17 @@ <example> <title>Sending mail with extra headers.</title> <programlisting> -mail("nobody@aol.com", "the subject", $message, +mail("nobody@example.com", "the subject", $message, "From: webmaster@$SERVER_NAME\nReply-To: webmaster@$SERVER_NAME\nX-Mailer: PHP/" . phpversion()); </programlisting> </example> - With the fifth parameter you can set additional command line parameters to - the actual mailer. In the example below we set the correct Return-Path - header for sendmail. Normally sendmail will add the X-Authentication-Warning - header when using the -f parameter, because the webserver user is probably - not a member of the trusted users. To suppress this warning, you should add - the web server user to the trusted users in your sendmail config file. + With the fifth parameter you can set additional command line + parameters to the mail program. In the example below we set the + correct Return-Path header when using sendmail. Normally sendmail + will add the X-Authentication-Warning header when using the -f + parameter, because the webserver user is probably not a member of + the trusted users. To suppress this warning, you should add the web + server user to the trusted users in your sendmail configuration file. </para> <note> <para> @@ -97,7 +97,7 @@ <example> <title>Sending mail with extra headers and setting an additional command line parameter.</title> <programlisting> -mail("nobody@aol.com", "the subject", $message, +mail("nobody@example.com", "the subject", $message, "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVER_NAME"); </programlisting> </example> @@ -107,9 +107,8 @@ <title>Sending complex email.</title> <programlisting> /* recipients */ -$recipient .= "Mary &lt;mary@u.college.edu>" . ", " ; //note the comma -$recipient .= "Kelly &lt;kelly@u.college.edu>" . ", "; -$recipient .= "ronabop@php.net"; +$recipient .= "Mary &lt;mary@example.com&gt;" . ", " ; //note the comma +$recipient .= "Kelly &lt;kelly@example.com&gt;"; /* subject */ $subject = "Birthday Reminders for August"; @@ -121,22 +120,22 @@ $message .= "17rd\t\tAug \t\t1973\n"; /* you can add a stock signature */ -$message .= "--\r\n"; //Signature delimiter -$message .= "Birthday reminder copylefted by public domain"; +$message .= "-- \r\n"; //Signature delimiter +$message .= "Birthday reminder"; /* additional header pieces for errors, From cc's, bcc's, etc */ -$headers .= "From: Birthday Reminder &lt;birthday@php.net>\n"; -$headers .= "X-Sender: &lt;birthday@php.net>\n"; +$headers .= "From: Birthday Reminder &lt;birthday@example.com&gt;\n"; +$headers .= "X-Sender: &lt;birthday@example.com&gt;\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! -$headers .= "Return-Path: &lt;birthday@php.net>\n"; // Return path for errors +$headers .= "Return-Path: &lt;birthday@example.com&gt;\n"; // Return path for errors -/* If you want to send html mail, uncomment the following line */ -// $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type +/* To send HTML mail, you can set the Content-type header. */ +// $headers .= "Content-type: text/html; charset=iso-8859-1\n"; -$headers .= "cc: birthdayarchive@php.net\n"; // CC to -$headers .= "bcc: birthdaycheck@php.net, birthdaygifts@php.net"; // BCCs to +$headers .= "Cc: birthdayarchive@example.com\n"; +$headers .= "Bcc: birthdaycheck@example.com\n"; /* and now mail it */ mail($recipient, $subject, $message, $headers); @@ -173,7 +172,7 @@ <example> <title>Calculating the hash and subscribing a user</title> <programlisting> -$user = "kris@koehntopp.de"; +$user = "joecool@example.com"; $hash = ezmlm_hash ($user); $query = sprintf ("INSERT INTO sample VALUES (%s, '%s')", $hash, $user); $db->query($query); // using PHPLIB db interface

« previous php.doc (#969338396) next »