php-doc-en/functions/mail.sgml
James Gingerich 82c6591284 Many minor cleanups.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@9864 c90b9560-bf6c-de11-be94-00142212c4b1
1999-06-20 03:04:56 +00:00

68 lines
2.1 KiB
Text

<reference id="ref.mail">
<title>Mail functions</title>
<titleabbrev>Mail</titleabbrev>
<partintro>
<simpara>
The <function>mail</function> function allows you to send mail.
</partintro>
<refentry id="function.mail">
<refnamediv>
<refname>mail</refname>
<refpurpose>send mail</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>bool <function>mail</function></funcdef>
<paramdef>string <parameter>to</parameter></paramdef>
<paramdef>string <parameter>subject</parameter></paramdef>
<paramdef>string <parameter>message</parameter></paramdef>
<paramdef>string <parameter><optional>additional_headers</optional></parameter></paramdef>
</funcsynopsis>
<simpara>
<function>Mail</function> automatically mails the message specified
in <parameter>message</parameter> to the receiver specified in
<parameter>to</parameter>. Multiple recipients can be specified by
putting a space between each address in <parameter>to</parameter>.
<para>
<example>
<title>Sending mail.</title>
<programlisting>
mail("rasmus@lerdorf.on.ca", "My Subject", "Line 1\nLine 2\nLine 3");
</programlisting>
</example>
<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.
<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>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->