uTools-Manuals/docs/php/imap_mail.html
2019-04-08 23:22:26 +08:00

150 lines
4.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 an email message</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.imap-mail" class="refentry">
<div class="refnamediv">
<h1 class="refname">imap_mail</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">imap_mail</span> &mdash; <span class="dc-title">Send an email message</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.imap-mail-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>imap_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">$cc</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$bcc</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$rpath</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
]]]] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
This function allows sending of emails with correct handling of
Cc and Bcc receivers.
</p>
<p class="para">
The parameters <code class="parameter">to</code>, <code class="parameter">cc</code>
and <code class="parameter">bcc</code> are all strings and are all parsed
as <a href="http://www.faqs.org/rfcs/rfc822" class="link external">&raquo;&nbsp;RFC822</a> address lists.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.imap-mail-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">to</code></dt>
<dd>
<p class="para">
The receiver
</p>
</dd>
<dt>
<code class="parameter">subject</code></dt>
<dd>
<p class="para">
The mail subject
</p>
</dd>
<dt>
<code class="parameter">message</code></dt>
<dd>
<p class="para">
The mail body, see <span class="function"><a href="imap_mail_compose.html" class="function">imap_mail_compose()</a></span>
</p>
</dd>
<dt>
<code class="parameter">additional_headers</code></dt>
<dd>
<p class="para">
As string with additional headers to be set on the mail
</p>
</dd>
<dt>
<code class="parameter">cc</code></dt>
<dd>
<p class="para">
</p>
</dd>
<dt>
<code class="parameter">bcc</code></dt>
<dd>
<p class="para">
The receivers specified in <code class="parameter">bcc</code> will get the
mail, but are excluded from the headers.
</p>
</dd>
<dt>
<code class="parameter">rpath</code></dt>
<dd>
<p class="para">
Use this parameter to specify return path upon mail delivery failure.
This is useful when using PHP as a mail client for multiple users.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.imap-mail-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.imap-mail-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="mail.html" class="function" rel="rdfs-seeAlso">mail()</a> - 发送邮件</span></li>
<li class="member"><span class="function"><a href="imap_mail_compose.html" class="function" rel="rdfs-seeAlso">imap_mail_compose()</a> - Create a MIME message based on given envelope and body sections</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>