reference/mail/functions/mail.xml
d43f29f6a628996d1b7c3be487dcff39450146bf
...
...
@@ -13,8 +13,8 @@
13
13
<methodparam><type>string</type><parameter>to</parameter></methodparam>
14
14
<methodparam><type>string</type><parameter>subject</parameter></methodparam>
15
15
<methodparam><type>string</type><parameter>message</parameter></methodparam>
16
-
<methodparam choice="opt"><type>mixed</type><parameter>additional_headers</parameter></methodparam>
17
-
<methodparam choice="opt"><type>string</type><parameter>additional_parameters</parameter></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>array</type><type>string</type></type><parameter>additional_headers</parameter><initializer>[]</initializer></methodparam>
17
+
<methodparam choice="opt"><type>string</type><parameter>additional_params</parameter><initializer>""</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Sends an email.
...
...
@@ -100,14 +100,6 @@ $text = str_replace("\n.", "\n..", $text);
100
100
</para>
101
101
<note>
102
102
<para>
103
-
Before PHP 5.4.42 and 5.5.27, repectively, <parameter>additional_headers</parameter> did not have mail header
104
-
injection protection. Therefore, users must make sure specified headers
105
-
are safe and contains headers only. i.e. Never start mail body by putting
106
-
multiple newlines.
107
-
</para>
108
-
</note>
109
-
<note>
110
-
<para>
111
103
When sending mail, the mail <emphasis>must</emphasis> contain
112
104
a <literal>From</literal> header. This can be set with the
113
105
<parameter>additional_headers</parameter> parameter, or a default
...
...
@@ -118,7 +110,7 @@ $text = str_replace("\n.", "\n..", $text);
118
110
message similar to <literal>Warning: mail(): "sendmail_from" not
119
111
set in php.ini or custom "From:" header missing</literal>.
120
112
The <literal>From</literal> header sets also
121
-
<literal>Return-Path</literal> under Windows.
113
+
<literal>Return-Path</literal> when sending directly via SMTP (Windows only).
122
114
</para>
123
115
</note>
124
116
<note>
...
...
@@ -134,10 +126,10 @@ $text = str_replace("\n.", "\n..", $text);
134
126
</listitem>
135
127
</varlistentry>
136
128
<varlistentry>
137
-
<term><parameter>additional_parameters</parameter> (optional)</term>
129
+
<term><parameter>additional_params</parameter> (optional)</term>
138
130
<listitem>
139
131
<para>
140
-
The <parameter>additional_parameters</parameter> parameter
132
+
The <parameter>additional_params</parameter> parameter
141
133
can be used to pass additional flags as command line options to the
142
134
program configured to be used when sending mail, as defined by the
143
135
<literal>sendmail_path</literal> configuration setting. For example,
...
...
@@ -276,7 +268,7 @@ mail($to, $subject, $message, $headers);
276
268
<example>
277
269
<title>Sending mail with an additional command line parameter.</title>
278
270
<para>
279
-
The <parameter>additional_parameters</parameter> parameter
271
+
The <parameter>additional_params</parameter> parameter
280
272
can be used to pass an additional parameter to the program configured
281
273
to use when sending mail using the <literal>sendmail_path</literal>.
282
274
</para>
...
...
@@ -357,8 +349,8 @@ mail($to, $subject, $message, implode("\r\n", $headers));
357
349
&reftitle.notes;
358
350
<note>
359
351
<para>
360
-
The Windows implementation of <function>mail</function> differs in many
361
-
ways from the Unix implementation. First, it doesn't use a local binary
352
+
The SMTP implementation (Windows only) of <function>mail</function> differs in many
353
+
ways from the sendmail implementation. First, it doesn't use a local binary
362
354
for composing messages but only operates on direct sockets which means a
363
355
<literal>MTA</literal> is needed listening on a network socket (which
364
356
can either on the localhost or a remote machine).
...
...
@@ -419,8 +411,6 @@ mail($to, $subject, $message, implode("\r\n", $headers));
419
411
</para>
420
412
</refsect1>
421
413
</refentry>
422
-

423
-

424
414
<!-- Keep this comment at the end of the file
425
415
Local variables:
426
416
mode: sgml
427
417