cvs: phpdoc /en/functions mail.xml

From: Date: Mon, 05 Feb 2001 21:50:59 +0000
Subject: cvs: phpdoc /en/functions mail.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969334181@lists.php.net to get a copy of this message
derick Mon Feb 5 13:50:59 2001 EDT Modified files: /phpdoc/en/functions mail.xml Log: - Added documentation for the new fifth parameter to mail() Index: phpdoc/en/functions/mail.xml diff -u phpdoc/en/functions/mail.xml:1.9 phpdoc/en/functions/mail.xml:1.10 --- phpdoc/en/functions/mail.xml:1.9 Fri Oct 27 01:00:26 2000 +++ phpdoc/en/functions/mail.xml Mon Feb 5 13:50:59 2001 @@ -23,6 +23,9 @@ <paramdef>string <parameter><optional>additional_headers</optional> </parameter> + <paramdef>string + <parameter><optional>additional_parameters</optional> + </parameter> </paramdef> </funcprototype> </funcsynopsis> @@ -42,13 +45,32 @@ <simpara> If a fourth string argument is passed, this string is inserted at the end of the header. This is typically used to add extra - headers. Multiple extra headers are separated with a newline.</simpara> + headers. Multiple extra headers are separated with a newline. + </simpara> + <simpara> + If the fifth parameter is supplied, PHP will add this data + to the call to the mailer. This is useful when setting the + correct Return-Path header when using sendmail. + </simpara> <para> <example> <title>Sending mail with extra headers.</title> <programlisting> mail("nobody@aol.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. + <example> + <title>Sending mail with extra headers and setting an additional command line parameter.</title> + <programlisting> +mail("nobody@aol.com", "the subject", $message, + "From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVERNAME"); </programlisting> </example> You can also use fairly simple string building techniques to

« previous php.doc (#969334181) next »