<!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>Runtime Configuration</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mail.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="mail.resources.html">Resource Types</a></div> <div class="up"><a href="mail.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><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.html#ini.mail.add-x-header" class="link">mail.add_x_header</a></td> <td>"0"</td> <td>PHP_INI_PERDIR</td> <td>Available since PHP 5.3.0.</td> </tr> <tr> <td><a href="mail.configuration.html#ini.mail.log" class="link">mail.log</a></td> <td>NULL</td> <td>PHP_INI_PERDIR</td> <td>Available since PHP 5.3.0. (PHP_INI_SYSTEM|PHP_INI_PERDIR)</td> </tr> <tr> <td><a href="mail.configuration.html#ini.smtp" class="link">SMTP</a></td> <td>"localhost"</td> <td>PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr> <td><a href="mail.configuration.html#ini.smtp-port" class="link">smtp_port</a></td> <td>"25"</td> <td>PHP_INI_ALL</td> <td>Available since PHP 4.3.0.</td> </tr> <tr> <td><a href="mail.configuration.html#ini.sendmail-from" class="link">sendmail_from</a></td> <td>NULL</td> <td>PHP_INI_ALL</td> <td class="empty"> </td> </tr> <tr> <td><a href="mail.configuration.html#ini.sendmail-path" class="link">sendmail_path</a></td> <td>"/usr/sbin/sendmail -t -i"</td> <td>PHP_INI_SYSTEM</td> <td class="empty"> </td> </tr> </tbody> </table> For further details and definitions of the PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>. </p> <p class="para">Here's a short explanation of the configuration directives.</p> <p class="para"> <dl> <dt id="ini.mail.add-x-header"> <span class="term"> <em><code class="parameter">mail.add_x_header</code></em> <span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span> </span> <dd> <p class="para"> Add <em>X-PHP-Originating-Script</em> that will include UID of the script followed by the filename. </p> </dd> </dt> <dt id="ini.mail.log"> <span class="term"> <em><code class="parameter">mail.log</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <p class="para"> The path to a log file that will log all <span class="function"><a href="function.mail.html" class="function">mail()</a></span> calls. Log entries include the full path of the script, line number, <em>To</em> address and headers. </p> </dd> </dt> <dt id="ini.smtp"> <span class="term"> <em><code class="parameter">SMTP</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <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.html" class="function">mail()</a></span> function. </p> </dd> </dt> <dt id="ini.smtp-port"> <span class="term"> <em><code class="parameter">smtp_port</code></em> <span class="type"><a href="language.types.integer.html" class="type int">int</a></span> </span> <dd> <p class="para"> Used under Windows only: Number of the port to connect to the server specified with the <em>SMTP</em> setting when sending mail with <span class="function"><a href="function.mail.html" class="function">mail()</a></span>; defaults to 25. Only available since PHP 4.3.0. </p> </dd> </dt> <dt id="ini.sendmail-from"> <span class="term"> <em><code class="parameter">sendmail_from</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <dd> <p class="para"> Which <em>"From:"</em> mail address should be used in mail sent from PHP under Windows. This directive also sets the <em>"Return-Path:"</em> header. </p> </dd> </dt> <dt id="ini.sendmail-path"> <span class="term"> <em><code class="parameter">sendmail_path</code></em> <span class="type"><a href="language.types.string.html" class="type string">string</a></span> </span> <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://www.qmail.org/" class="link external">» 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"><var class="varname">smtp</var></var>, <var class="varname"><var class="varname">smtp_port</var></var> and <var class="varname"><var class="varname">sendmail_from</var></var> are ignored and the specified command is executed. </p> </dd> </dt> </dl> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mail.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="mail.resources.html">Resource Types</a></div> <div class="up"><a href="mail.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>