Dan Posted September 23, 2012 Share Posted September 23, 2012 This really isn't PHP related, but I was wondering if anyone else got the following message when trying to send email from a PHP script such as the one in the register.php in Chapter 18? I am trying this on a Mac running Mountain Lion. I have been searching for a solution with no luck so far. This message is from the mail.log file on my machine. postfix/sendmail[15136]: fatal: Recipient addresses must be specified on the command line or via the -t option Thanks in advance for everyone's help. Dan Link to comment Share on other sites More sharing options...
Dan Posted September 23, 2012 Author Share Posted September 23, 2012 In addition, I have a feeling this is a configuration issue with sendmail, not so much code related. Link to comment Share on other sites More sharing options...
Dan Posted September 25, 2012 Author Share Posted September 25, 2012 Finally figured out what the deal was with this. I had to modify my php.ini file to add the -t option at the end of the following line: sendmail_path =/usr/sbin/sendmail -t 1 Link to comment Share on other sites More sharing options...
Larry Posted September 25, 2012 Share Posted September 25, 2012 Thanks for sharing that and kudos for figuring it out! Link to comment Share on other sites More sharing options...
JasonC Posted April 29, 2013 Share Posted April 29, 2013 I have a similar problem not fixed with the above solution. For some reason, Postfix on my Mac (running OSX 10.6.8) is setting the "From" as coming from the Apache User (_www on my machine), despite the PHP headers and despite the -t flag above. My real-world email server then rejects the email because _www is "Not our Customer (in reply to MAIL FROM command)." If I change the Apache user to my user name for my real world email account, everything works fine. I have usually had the Apache User set to my login name on my Mac, but have read this is not a good idea, Apache should be running under its own login, so I switched it back to the defaults. This is esoteric, maybe, but if anyone has advice, it would be appreciated! Meanwhile, I will keep Googling away and reading up, looking for solutions. I suspect the fix is easy, but finding it is not... Link to comment Share on other sites More sharing options...
Larry Posted April 29, 2013 Share Posted April 29, 2013 You should be able to edit the /etc/postfix/main.cf file to configure Postfix the way you need it to behave. There's a "SENDING MAIL" section there that should apply. Link to comment Share on other sites More sharing options...
Recommended Posts