php-doc-en/functions/mail.xml
Egon Schmid 8760403ff1 Sorry I had no time during the LinuxDays at Stuttgart.
over the documentation. We used the Mandrake 7.1 and the stylesheet are not
supported. Since the Mandrake documentation for version 7.1 is done with the
with
DocBook, we will get tomorrow some support from the people who are hanging
around at the LinuxDay in Stuttgart


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27490 c90b9560-bf6c-de11-be94-00142212c4b1
2000-07-01 21:36:42 +00:00

101 lines
3.1 KiB
XML

<reference id="ref.mail">
<title>Mail functions</title>
<titleabbrev>Mail</titleabbrev>
<partintro>
<simpara>
The <function>mail</function> function allows you to send mail.</simpara>
</partintro>
<refentry id="function.mail">
<refnamediv>
<refname>mail</refname>
<refpurpose>send mail</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<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>
</funcprototype>
</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 comma between each address in <parameter>to</parameter>.</simpara>
<para>
<example>
<title>Sending mail.</title>
<programlisting>
mail("rasmus@lerdorf.on.ca", "My Subject", "Line 1\nLine 2\nLine 3");
</programlisting>
</example></para>
<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>
<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></para>
</refsect1>
</refentry>
<refentry id="function.ezmlm-hash">
<refnamediv>
<refname>ezmlm_hash</refname>
<refpurpose>Calculate the hash value needed by EZMLM</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>ezmlm_hash</function></funcdef>
<paramdef>string <parameter>addr</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<simpara>
<function>ezmlm_hash</function> calculates the hash value needed
when keeping EZMLM mailing lists in a MySQL database.
</simpara>
<para>
<example>
<title>Calculating the hash and subscribing a user</title>
<programlisting>
$user = "kris@koehntopp.de";
$hash = ezmlm_hash ($user);
$query = sprintf ("INSERT INTO sample VALUES (%s, '%s')", $hash, $user);
$db->query($query); // using PHPLIB db interface
</programlisting>
</example>
</para>
</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:
-->