Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Nashville, TN

    getting php mail() to work with apache2/php5/debian

    I put together some php stuff on my test server with debian/php5/apache2. In our php.ini file, sendmail_path is set equal to the IP address of our SMTP server, and everything works great.

    When I tried to put together a production server to actually serve the page, again using debian/php5/apache2, I couldn't get it to work. When I run a little test script it says:

    sh: (ip of the SMTP server): command not found

    As though it's trying to run the IP address of the server as a command. I've tried everything I can think of, even copying over the config files from the test server, but nothing seems to answer. Is there something I need to have configured to have the server IP work there, or is my test server just magical?

  2. #2
    Linux Newbie
    Join Date
    Apr 2005
    South America
    Dude, the sendmail_path is exactly what it is... the path to the sendmail binary, such as /usr/lib/sendmail. Not your mail server IP. Notice you can also pass arguments after the binary's path, something like
    sendmail_path=/usr/lib/sendmail -t

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts