<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.imap.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.imap-mail.php',
    1 => 'imap_mail',
    2 => 'Sendet eine E-Mail-Nachricht',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'IMAP Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.imap-lsub.php',
    1 => 'imap_lsub',
  ),
  'next' => 
  array (
    0 => 'function.imap-mail-compose.php',
    1 => 'imap_mail_compose',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/imap/functions/imap-mail.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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, PHP 8)</p><p class="refpurpose"><span class="refname">imap_mail</span> &mdash; <span class="dc-title">Sendet eine E-Mail-Nachricht</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.imap-mail-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_mail</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$to</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$subject</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$message</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$additional_headers</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$cc</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$bcc</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$return_path</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Diese Funktion ermöglicht das Senden einer E-Mail mit korrekter Behandlung
   von Cc- und Bcc-Kopffeldern.
  </p>
  <p class="para">
   Die Parameter <code class="parameter">to</code>, <code class="parameter">cc</code> und
   <code class="parameter">bcc</code> sind Strings, die als Adresslisten gemäß
   <a href="https://datatracker.ietf.org/doc/html/rfc822" class="link external">&raquo;&nbsp;RFC822</a> interpretiert werden.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imap-mail-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">to</code></dt>
     <dd>
      <p class="para">
       Der Empfänger der Nachricht
      </p>
     </dd>
    
    
     <dt><code class="parameter">subject</code></dt>
     <dd>
      <p class="para">
       Die Betreffzeile der Nachricht
      </p>
     </dd>
    
    
     <dt><code class="parameter">message</code></dt>
     <dd>
      <p class="para">
       Der Inhalt der Nachricht, siehe <span class="function"><a href="function.imap-mail-compose.php" class="function">imap_mail_compose()</a></span>
      </p>
     </dd>
    
    
     <dt><code class="parameter">additional_headers</code></dt>
     <dd>
      <p class="para">
       Ein String mit zusätzlichen Kopfzeilen
      </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">
       Die in <code class="parameter">bcc</code> angegebenen weiteren Empfänger
       erhalten die Nachricht, werden aber nicht im Nachrichtenkopf
       aufgeführt.
      </p>
     </dd>
    
    
     <dt><code class="parameter">return_path</code></dt>
     <dd>
      <p class="para">
       Die Rückgabeadresse für den Fall, dass die Zustellung der Nachricht
       fehlschlägt. Diese ist nützlich, wenn PHP als Mail-Client für mehrere
       Benutzer verwendet wird.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imap-mail-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-mail-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">additional_headers</code>, <code class="parameter">cc</code>,
       <code class="parameter">bcc</code> und <code class="parameter">return_path</code> sind
       nun Nullable-Typen.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.imap-mail-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mail.php" class="function" rel="rdfs-seeAlso">mail()</a> - Sendet eine E-Mail</span></li>
    <li><span class="function"><a href="function.imap-mail-compose.php" class="function" rel="rdfs-seeAlso">imap_mail_compose()</a> - Erzeugt eine MIME-Nachricht aus Kopf- und Nachrichtenelementen</span></li>
   </ul>
  </p>
 </div>


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