Jump to content
Larry Ullman's Book Forums

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

  • Upvote 1

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...