reference/mbstring/functions/mb-send-mail.xml
92f1b8b177eb5730382abf9f27bae868f1bb636f
...
...
@@ -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>string</type><parameter>additional_headers</parameter><initializer>&null;</initializer></methodparam>
17
-
<methodparam choice="opt"><type>string</type><parameter>additional_parameter</parameter><initializer>&null;</initializer></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 class="union"><type>string</type><type>null</type></type><parameter>additional_params</parameter><initializer>&null;</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Sends email. Headers and messages are converted and encoded according
...
...
@@ -58,13 +58,17 @@
58
58
<term><parameter>additional_headers</parameter> (optional)</term>
59
59
<listitem>
60
60
<para>
61
-
String to be inserted at the end of the email header.
61
+
<type>String</type> or <type>array</type> to be inserted at the end of the email header.
62
62
</para>
63
63
<para>
64
64
This is typically used to add extra headers (From, Cc, and Bcc).
65
65
Multiple extra headers should be separated with a CRLF (\r\n).
66
66
Validate parameter not to be injected unwanted headers by attackers.
67
67
</para>
68
+
<para>
69
+
If an <type>array</type> is passed, its keys are the header names and its
70
+
values are the respective header values.
71
+
</para>
68
72
<note>
69
73
<para>
70
74
When sending mail, the mail <emphasis>must</emphasis> contain
...
...
@@ -93,17 +97,17 @@
93
97
</listitem>
94
98
</varlistentry>
95
99
<varlistentry>
96
-
<term><parameter>additional_parameter</parameter></term>
100
+
<term><parameter>additional_params</parameter></term>
97
101
<listitem>
98
102
<para>
99
-
<parameter>additional_parameter</parameter> is a MTA command line
103
+
<parameter>additional_params</parameter> is a MTA command line
100
104
parameter. It is useful when setting the correct Return-Path
101
105
header when using sendmail.
102
106
</para>
103
107
<para>
104
108
This parameter is escaped by <function>escapeshellcmd</function> internally
105
109
to prevent command execution. <function>escapeshellcmd</function> prevents
106
-
command execution, but allows to add addtional parameters. For security reason,
110
+
command execution, but allows to add additional parameters. For security reason,
107
111
this parameter should be validated.
108
112
</para>
109
113
<para>
...
...
@@ -130,6 +134,37 @@
130
134
</para>
131
135
</refsect1>
132
136

137
+
<refsect1 role="changelog">
138
+
&reftitle.changelog;
139
+
<para>
140
+
<informaltable>
141
+
<tgroup cols="2">
142
+
<thead>
143
+
<row>
144
+
<entry>&Version;</entry>
145
+
<entry>&Description;</entry>
146
+
</row>
147
+
</thead>
148
+
<tbody>
149
+
<row>
150
+
<entry>8.0.0</entry>
151
+
<entry>
152
+
<parameter>additional_params</parameter> is nullable now.
153
+
</entry>
154
+
</row>
155
+
<row>
156
+
<entry>7.2.0</entry>
157
+
<entry>
158
+
The <parameter>additional_headers</parameter> parameter now also accepts
159
+
an <type>array</type>.
160
+
</entry>
161
+
</row>
162
+
</tbody>
163
+
</tgroup>
164
+
</informaltable>
165
+
</para>
166
+
</refsect1>
167
+

133
168
<refsect1 role="seealso">
134
169
&reftitle.seealso;
135
170
<para>
...
...
@@ -142,7 +177,6 @@
142
177
</refsect1>
143
178

144
179
</refentry>
145
-

146
180
<!-- Keep this comment at the end of the file
147
181
Local variables:
148
182
mode: sgml
149
183