<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Send encoded mail</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mb-regex-set-options.html">mb_regex_set_options</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mb-split.html">mb_split</a></div> <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.mb-send-mail" class="refentry"> <div class="refnamediv"> <h1 class="refname">mb_send_mail</h1> <p class="verinfo">(PHP 4 >= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">mb_send_mail</span> — <span class="dc-title">Send encoded mail</span></p> </div> <div class="refsect1 description" id="refsect1-function.mb-send-mail-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>mb_send_mail</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$to</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$subject</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$additional_headers</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$additional_parameter</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span> ]] )</div> <p class="para rdfs-comment"> Sends email. Headers and messages are converted and encoded according to the <span class="function"><a href="function.mb-language.html" class="function">mb_language()</a></span> setting. It's a wrapper function for <span class="function"><a href="function.mail.html" class="function">mail()</a></span>, so see also <span class="function"><a href="function.mail.html" class="function">mail()</a></span> for details. </p> </div> <div class="refsect1 parameters" id="refsect1-function.mb-send-mail-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">to</code></em></span> <dd> <p class="para"> The mail addresses being sent to. Multiple recipients may be specified by putting a comma between each address in <em><code class="parameter">to</code></em>. This parameter is not automatically encoded. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">subject</code></em></span> <dd> <p class="para"> The subject of the mail. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">message</code></em></span> <dd> <p class="para"> The message of the mail. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">additional_headers</code></em></span> <dd> <p class="para"> <em><code class="parameter">additional_headers</code></em> is inserted at the end of the header. This is typically used to add extra headers. Multiple extra headers are separated with a newline ("\n"). </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">additional_parameter</code></em></span> <dd> <p class="para"> <em><code class="parameter">additional_parameter</code></em> is a MTA command line parameter. It is useful when setting the correct Return-Path header when using sendmail. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.mb-send-mail-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 changelog" id="refsect1-function.mb-send-mail-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.0.0</td> <td> The <em>Content-Type</em> and <em>Content-Transfer-Encoding</em> headers may be redefined as of PHP 5.0.0. Before this time, the values defined by <span class="function"><a href="function.mb-language.html" class="function">mb_language()</a></span> are always used. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 seealso" id="refsect1-function.mb-send-mail-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.mail.html" class="function" rel="rdfs-seeAlso">mail()</a> - Send mail</span></li> <li class="member"> <span class="function"><a href="function.mb-encode-mimeheader.html" class="function" rel="rdfs-seeAlso">mb_encode_mimeheader()</a> - Encode string for MIME header</span></li> <li class="member"> <span class="function"><a href="function.mb-language.html" class="function" rel="rdfs-seeAlso">mb_language()</a> - Set/Get current language</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.mb-regex-set-options.html">mb_regex_set_options</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.mb-split.html">mb_split</a></div> <div class="up"><a href="ref.mbstring.html">Multibyte String Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>