admin 发表于 2023-2-16 18:54:44

PHP Mail 函数

<div id="article_content" class="article_content clearfix">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css">
      <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-6e43165c0a.css">
                <div id="content_views" class="htmledit_views">
                  <h2>PHP Mail 简介</h2>
<p>mail() 函数允许您从脚本中直接发送电子邮件。</p>
<hr>
<h2>需求</h2>
<p>要使邮件函数可用&#xff0c;PHP 需要已安装且正在运行的邮件系统。要使用的程序是由 php.ini 文件中的配置设置定义的。</p>
<hr>
<h2>安装</h2>
<p>Mail 函数是 PHP 核心的组成部分。无需安装即可使用这些函数。</p>
<hr>
<h2>Runtime 配置</h2>
<p>Mail 函数的行为受 php.ini 文件中的设置的影响。</p>
<p>Mail 配置选项&#xff1a;</p>
<table><tbody><tr><th>名称</th><th>默认</th><th>描述</th><th>可更改</th></tr><tr><td>SMTP</td><td>&#34;localhost&#34;</td><td>Windows 专用&#xff1a;SMTP 服务器的 DNS 名称或 IP 地址。</td><td>PHP_INI_ALL</td></tr><tr><td>smtp_port</td><td>&#34;25&#34;</td><td>Windows 专用&#xff1a;SMTP 端口号。自 PHP 4.3 起可用。</td><td>PHP_INI_ALL</td></tr><tr><td>sendmail_from</td><td>NULL</td><td>Windows 专用&#xff1a;规定在由 PHP 发送的电子邮件中使用的 &#34;from&#34; 地址。</td><td>PHP_INI_ALL</td></tr><tr><td>sendmail_path</td><td>NULL</td><td>Unix 系统专用&#xff1a;规定 sendmail 程序的路径&#xff08;通常 /usr/sbin/sendmail 或 /usr/lib/sendmail&#xff09;。</td><td>PHP_INI_SYSTEM</td></tr></tbody></table>
<p></p>
<hr>
<h2>PHP Mail 函数</h2>
<p><strong>PHP</strong>&#xff1a;指示支持该函数的最早的 PHP 版本。</p>
<table><tbody><tr><th>函数</th><th>描述</th><th>PHP</th></tr><tr><td><ahref="https://www.runoob.com/php/func-mail-ezmlm_hash.html">ezmlm_hash()</a></td><td>计算 EZMLM 邮件列表系统所需的散列值。</td><td>3</td></tr><tr><td><ahref="https://www.runoob.com/php/func-mail-mail.html">mail()</a></td><td>允许您从脚本中直接发送电子邮件。</td><td>3</td></tr></tbody></table>
<p></p>
<hr>
<h2>PHP Mail 常量</h2>
<p><strong>无。</strong></p>
                </div>
      </div>
      <div id="treeSkill"></div>
页: [1]
查看完整版本: PHP Mail 函数