downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Ressource-Typen> <Installation
[edit] Last updated: Fri, 17 May 2013

view this page in

Laufzeit-Konfiguration

Das Verhalten dieser Funktionen wird durch Einstellungen in der php.ini beeinflusst.

Mail-Konfigurationsoptionen
Name Standard Veränderbar Changelog
mail.add_x_header "0" PHP_INI_PERDIR Verfügbar seit PHP 5.3.0.
mail.log NULL PHP_INI_PERDIR Verfügbar seit PHP 5.3.0.
SMTP "localhost" PHP_INI_ALL  
smtp_port "25" PHP_INI_ALL Verfügbar seit PHP 4.3.0.
sendmail_from NULL PHP_INI_ALL  
sendmail_path "/usr/sbin/sendmail -t -i" PHP_INI_SYSTEM  
Weitere Details und die Definitionen der PHP_INI_*-Konstanten finden Sie im Wo Konfigurationseinstellungen gesetzt werden können.

Hier eine kurze Erklärung der Konfigurationsoptionen:

mail.add_x_header bool

Fügt den X-PHP-Originating-Script-Header hinzu, der die UID des Skripts gefolgt vom Dateinamen enthält.

mail.log string

Der Pfad zur Log-Datei, in der mail()-Aufrufe geloggt werden. Die Log-Einträge enthalten den vollen Pfad des Skripts, die Zeilennummer, die To-Adresse und alle Header.

SMTP string

Wird nur unter Windows benutzt: Hostname oder IP-Adresse des SMTP-Servers, den PHP für Mails, die mit der mail()-Funktion verschickt werden, nutzen soll.

smtp_port int

Wird nur unter Windows benutzt: Nummer des Ports des Servers (angegeben in der SMTP-Option), um eine Verbindung herzustellen, wenn eine Mail mit der mail()-Funktion verschickt wird. Standardwert ist 25. Diese Option ist verfügbar ab PHP 4.3.0.

sendmail_from string

"From:"-Mail-Adresse, die beim Mail-Versand unter Windows benutzt werden soll. Diese Direktive setzt auch den "Return-Path:" Header.

sendmail_path string

Pfad, in dem sich das sendmail-Programm befindet, z.B. /usr/sbin/sendmail oder /usr/lib/sendmail. configure versucht, die richtige Position automatisch zu finden. Falls die automatische Erkennung aber fehlschlägt und der Standardwert auf Ihrem Rechner falsch ist, dann können Sie hier den richtigen Pfad setzen.

Falls Sie auf Ihrem Rechner sendmail nicht benutzen, müssen Sie den Pfad angeben, in sich der sendmail-Wrapper/-Ersatz befindet, sofern vorhanden. Zum Beispiel können » Qmail-Benutzer diese Option auf /var/qmail/bin/sendmail oder /var/qmail/bin/qmail-inject setzen.

qmail-inject benötigt keine Optionen, um Mails korrekt zu verarbeiten.

Diese Option funktioniert auch unter Windows. Wenn Sie gesetzt ist, werden smtp, smtp_port und sendmail_from ignoriert und das angegebene Kommando wird ausgeführt.



Ressource-Typen> <Installation
[edit] Last updated: Fri, 17 May 2013
 
add a note add a note User Contributed Notes Laufzeit-Konfiguration - [5 notes]
up
1
blueshibuyadream at gmail dot com
2 months ago
On Darwin OS such as OSX (current one: 10.8.3) you need to add a specific command and option to the sendmail_path constant if you have downloaded and installed a mamp with a stack.

Indeed you can see the required libraries for PHP, Apache, MySQL in "common/lib" folder. The problem is when you run an external command using these libraries, for example "sendmail". It could be a problem if it gets the stack libraries and not the system ones (different versions, etc).

The "env -i" command clean the Stack environment variables and run "sendmail" with the system libraries.

Hope this helps.
up
0
rgdobie at conwave dot com dot au
3 months ago
Under Windows, I found sendmail_from needed to be a valid email address which has been defined on the mail server being addressed.
up
0
A Austin
11 months ago
For linux you can over-ride the default "From" for the outgoing emails by including in php.ini this line:

sendmail_path = "/usr/sbin/sendmail -t -i -f fromMe@blah.com"

The path should work for most linux installations.
up
0
Robert
2 years ago
Despite what this page says about the "SMTP" and "smtp_port" settings being used only under Windows, all Drupal sites use these settings to send email, regardless of which OS they're running in.
up
-1
stuart at horuskol dot net
1 year ago
The mail.add_x_header configuration value is set to "On" in the default production php.ini (although the default value of this setting is Off)

 
show source | credits | sitemap | contact | advertising | mirror sites