Area personale

 

Tag

 

Ultime visite al Blog

taichungmonellaccio19amorino11m12ps12acer.250miriade159prefazione09Marion20cassetta2limitedelbosco0marabertowjoerivetto6surfinia60Catter1na
 

Ultimi commenti

 
Creato da: taichung il 12/01/2011
Linux Drupal Pinephone Freerunner Android

 

 
« Drush on OpenshiftEstrarre immagini da pdf... »

PHP, change default email sender and address

Post n°56 pubblicato il 29 Luglio 2017 da taichung
 

The php.ini file lets you configure the default sender (the From in the email header) and email address

If you have multiple php.ini files (for example one for cli, one for apache, etc), you need to find the right one for your purpose or even change 'em all.

EX: You want to set the From field instead of thedefault www-data to noreply, and the email address of the sender as noreply@mydomain.net in a Linux system (for Windows it's different).

To accomplish this, add the following line in your php.ini file:
sendmail_path ='/usr/sbin/sendmail -t -i -fnoreply@mydomain.net -Fnoreply'

Where:
-F "name": Sets the name to put in the From: header.
-f address: Sets the From: address. This is just the E-mail address only, not the name.


Save, reboot all the involved services (webserver, php-fpm...) and you're done

Reference: http://www.courier-mta.org/sendmail.html
 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 
Vai alla Home Page del blog

Cerca in questo Blog

  Trova
 
RSS (Really simple syndication) Feed Atom
 

Archivio messaggi

 
 << Luglio 2024 >> 
 
LuMaMeGiVeSaDo
 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 
 

Sponsored link

 

Sponsored link

Inchiostro stampanti varie marche a prezzi competitivi

 

© Italiaonline S.p.A. 2024Direzione e coordinamento di Libero Acquisition S.á r.l.P. IVA 03970540963