<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/mail.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'mail.configuration.php',
    1 => 'Runtime Configuration',
    2 => 'Runtime Configuration',
  ),
  'up' => 
  array (
    0 => 'mail.setup.php',
    1 => 'Installing/Configuring',
  ),
  'prev' => 
  array (
    0 => 'mail.requirements.php',
    1 => 'Requirements',
  ),
  'next' => 
  array (
    0 => 'ref.mail.php',
    1 => 'Mail Functions',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mail/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mail.configuration" class="section">
 <h2 class="title">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <p class="para">
 <table class="doctable table">
  <caption><strong>Mail configuration options</strong></caption>
  
   <thead>
    <tr>
     <th>Name</th>
     <th>Default</th>
     <th>Changeable</th>
     <th>Changelog</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><a href="mail.configuration.php#ini.mail.add-x-header" class="link">mail.add_x_header</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-perdir">INI_PERDIR</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.mail.mixed_lf_and_crlf" class="link">mail.mixed_lf_and_crlf</a></td>
     <td>&quot;0&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong>|<strong><code><a href="info.constants.php#constant.ini-perdir">INI_PERDIR</a></code></strong></td>
     <td>Added in PHP 8.2.4</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.mail.log" class="link">mail.log</a></td>
     <td>NULL</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong>|<strong><code><a href="info.constants.php#constant.ini-perdir">INI_PERDIR</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.mail.force_extra_parameters" class="link">mail.force_extra_parameters</a></td>
     <td>NULL</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.smtp" class="link">SMTP</a></td>
     <td>&quot;localhost&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.smtp-port" class="link">smtp_port</a></td>
     <td>&quot;25&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.sendmail-from" class="link">sendmail_from</a></td>
     <td>NULL</td>
     <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="mail.configuration.php#ini.sendmail-path" class="link">sendmail_path</a></td>
     <td>&quot;/usr/sbin/sendmail -t -i&quot;</td>
     <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
     <td class="empty">&nbsp;</td>
    </tr>

   </tbody>
  
 </table>

 For further details and definitions of the
INI_* modes, see the <a href="configuration.changes.modes.php" class="xref">Where a configuration setting may be set</a>.
 </p>
 
 <p class="para">Here&#039;s a short explanation of
the configuration directives.</p>
 
 <p class="para">
 <dl>
  
   <dt id="ini.mail.add-x-header">
    <code class="parameter">mail.add_x_header</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <p class="para">
     Add <code class="literal">X-PHP-Originating-Script</code> that will include UID of
     the script followed by the filename.
    </p>
   </dd>
  

  
   <dt id="ini.mail.log">
    <code class="parameter">mail.log</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     The path to a log file that will log all <span class="function"><a href="function.mail.php" class="function">mail()</a></span> calls.
     Log entries include the full path of the script, line number,
     <code class="literal">To</code> address and headers.
    </p>
   </dd>
  

  
   <dt id="ini.mail.mixed_lf_and_crlf">
    <code class="parameter">mail.mixed_lf_and_crlf</code>
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
   </dt>
   <dd>
    <p class="para">
     Allows reverting the line separator for email headers and message bodies to LF (Line Feed),
     mimicking the non-compliant behavior of PHP 7. It is provided as a compatibility measure
     for certain non-compliant Mail Transfer Agents (MTAs) that fail to correctly process CRLF
     (Carriage Return + Line Feed) as a line separator in email headers and message content.
    </p>
   </dd>
  

  
   <dt id="ini.mail.force_extra_parameters">
    <code class="parameter">mail.force_extra_parameters</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     Force the addition of the specified parameters to be passed as extra
     parameters to the sendmail binary. These parameters will always replace
     the value of the 5th parameter to <span class="function"><a href="function.mail.php" class="function">mail()</a></span>.
    </p>
    <span class="simpara">
     In addition to the default behavior for <strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong>,
     this value can also be set with <code class="literal">php_value</code>
     in <var class="filename">httpd.conf</var> (but this is not recommended).
    </span>
   </dd>
  

  
   <dt id="ini.smtp">
    <code class="parameter">SMTP</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     Used under Windows only: host name or IP address of the SMTP server PHP
     should use for mail sent with the <span class="function"><a href="function.mail.php" class="function">mail()</a></span> function.
    </p>
   </dd>
  

  
   <dt id="ini.smtp-port">
    <code class="parameter">smtp_port</code>
    <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
   </dt>
   <dd>
    <p class="para">
     Used under Windows only: Number of the port to connect to the server
     specified with the <code class="literal">SMTP</code> setting when sending mail
     with <span class="function"><a href="function.mail.php" class="function">mail()</a></span>; defaults to 25.
    </p>
   </dd>
  

  
   <dt id="ini.sendmail-from">
    <code class="parameter">sendmail_from</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     Which <code class="literal">&quot;From:&quot;</code> mail address should be used in mail sent
     directly via SMTP (Windows only).
     This directive also sets the <code class="literal">&quot;Return-Path:&quot;</code> header.
    </p>
   </dd>
  

  
   <dt id="ini.sendmail-path">
    <code class="parameter">sendmail_path</code>
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
   </dt>
   <dd>
    <p class="para">
     Where the <strong class="command">sendmail</strong> program can be found,
     usually <var class="filename">/usr/sbin/sendmail</var> or
     <var class="filename">/usr/lib/sendmail</var>.
     <strong class="command">configure</strong> does an honest attempt of
     locating this one for you and set a default, but if it fails,
     you can set it here.
    </p>
    <p class="para">
     Systems not using <strong class="command">sendmail</strong> should set this directive to the
     sendmail wrapper/replacement their mail system offers, if any.
     For example, <a href="http://cr.yp.to/qmail.html" class="link external">&raquo;&nbsp;Qmail</a>
     users can normally set it to
     <var class="filename">/var/qmail/bin/sendmail</var> or <var class="filename">
     /var/qmail/bin/qmail-inject</var>.
    </p>
    <p class="para">
     <strong class="command">qmail-inject</strong> does not require any option to
     process mail correctly.
    </p>
    <p class="para">
     This directive works also under Windows. If set, <var class="varname">smtp</var>,
     <var class="varname">smtp_port</var> and <var class="varname">sendmail_from</var> are
     ignored and the specified command is executed.
    </p>
   </dd>
  
 </dl>

 </p>
</div><?php manual_footer($setup); ?>