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

search for in the

Tipi di risorse> <Installazione
[edit] Last updated: Tue, 21 May 2013

view this page in

Configurazione di Runtime

Il comportamento di queste funzioni è influenzato dalle impostazioni di php.ini.

Opzioni di configurazione Mail
Nome Default Modificabile Storico dei cambiamenti
mail.add_x_header "0" PHP_INI_PERDIR Disponibile dal PHP 5.3.0.
mail.log NULL PHP_INI_PERDIR Disponibile dal PHP 5.3.0.
SMTP "localhost" PHP_INI_ALL  
smtp_port "25" PHP_INI_ALL Disponibile dal PHP 4.3.0.
sendmail_from NULL PHP_INI_ALL  
sendmail_path "/usr/sbin/sendmail -t -i" PHP_INI_SYSTEM  
Per maggiori dettagli e definizioni sui modi PHP_INI_*, vedere Where a configuration setting may be set.

Breve descrizione dei parametri di configurazione.

mail.add_x_header bool

Aggiunge X-PHP-Originating-Script che include l'UID dello script seguito dal nome del file.

mail.log string

Im percorso verso un file di log che registra tutte le chiamate a mail(). Le voci del log includono il percorso completo dello script, il numero di linea, Rl'indirizzo To e le intestazioni.

SMTP string

Usato solo con Windows: Nome DNS o indirizzo IP del server SMTP che PHP deve usare per spedire posta elettronica con la funzione mail().

smtp_port int

Usato solo con Windows: Numero della porta del server specificato da SMTP al quale connettersi quando si inviano email usando mail(); il valore predefinito è 25. Disponibile solo a partire da PHP 4.3.0.

sendmail_from string

Quale campo "From:" devono avere i messaggi inviati da PHP su Windows. Questa direttiva imposta anche l'intestazione "Return-Path:".

sendmail_path string

Dove trovare il programma sendmail, solitamente /usr/sbin/sendmail oppure /usr/lib/sendmail. configure cerca di trovare il file e lo imposta di default, ma se non riesce a localizzarlo, lo si può impostare qui.

I sistemi che non usano sendmail devono impostare questa direttiva al wrapper che i rispettivi sistemi di posta offrono, se esistenti. Per esempio, gli utenti di » Qmail possono normalmente impostarla a /var/qmail/bin/sendmail o /var/qmail/bin/qmail-inject.

qmail-inject non necessita di nessuna opzione al fine di processare correttamente la mail.

Questi parametri funzionano anche su Windows. Se si impostate smtp, smtp_port e sendmail_from saranno ignorate e verrà eseguito il comando indicato.



Tipi di risorse> <Installazione
[edit] Last updated: Tue, 21 May 2013
 
add a note add a note User Contributed Notes Configurazione di Runtime - [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