note 113849 added to mail.configuration

From: Date: Sun, 08 Dec 2013 19:52:53 +0000
Subject: note 113849 added to mail.configuration
Groups: php.notes 
Request: Send a blank email to php-notes+get-197840@lists.php.net to get a copy of this message
On Ubuntu 13.04, not sure of the other Distros. If you simply uncomment the default: sendmail_path = "sendmail -t -i" Your mail() functions will all fail. This is because, you should place the FULL PATH (i.e. /usr/sbin/sendmail -t -i ) The documentation states PHP tries it's best to find the correct sendmail path, but it clearly failed for me. So, always enter in the FULLPATH to sendmail or you may get unexpected failing results. As a secondary note: Those that just want to ENFORCE the -f parameter, you can do so in php.ini using: mail.force_extra_parameters = -fdo_not_reply@domain.tld You can leave the sendmail path commented out, it will still use the defaults (under UNIX -t -i options which if you look them up are very important to have set).... But, now there is no way to change this, even with the 5th argument of the mail() function. -f is important, because if NOT set, will be set to which ever user the PHP script is running under, and you may not want that. Also, -f sets the Return-Path: header which is used as the Bounce address, if errors occur, so you can process them. You you can not set Return-Path: in mail() headers for some reason... you could before. Now you have to use the -f option. ---- Server IP: 192.41.45.150 Probable Submitter: 76.121.245.200 ---- Manual Page -- http://php.net/manual/en/mail.configuration.php Edit -- https://master.php.net/note/edit/113849 Del: integrated -- https://master.php.net/note/delete/113849/integrated Del: useless -- https://master.php.net/note/delete/113849/useless Del: bad code -- https://master.php.net/note/delete/113849/bad+code Del: spam -- https://master.php.net/note/delete/113849/spam Del: non-english -- https://master.php.net/note/delete/113849/non-english Del: in docs -- https://master.php.net/note/delete/113849/in+docs Del: other reasons-- https://master.php.net/note/delete/113849 Reject -- https://master.php.net/note/reject/113849 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197840) next »