No SMTP server? Can't get mail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am having problems with mail(). The problem is that the email just never gets there. Mail appears to be working. To start, I am investigating the SMTP server. I can't understand some things.

1) I am sure that the smtp server is and is set to "localhost", but I want to verify this ...

-------------------------------------------------------------------------------------------
error_reporting(E_ALL);
echo 'display_errors = ' . ini_get('display_errors') . "\n";
echo 'register_globals = ' . ini_get('register_globals') . "\n";
echo "<br><br>";
echo "SMTP host: " . ini_get("smtp");
echo "SMTP port: " . ini_get("smtp_port");
echo "Sendmail From: " . ini_get("sendmail_from");

   gets:

1 1

SMTP host:
SMTP port: 25
Sendmail_from:
Notice: Use of undefined constant sendmail_from - assumed 'sendmail_from' in /home/

Obviously SMTP is defined (?? because it is not undefined?), but nothing is echo'd for SMTP. WHY?
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
    then ...

ini_set( smtp, "localhost" );

    gets:

Notice: Use of undefined constant smtp - assumed 'smtp' in /home/ ...
SMTP host:
SMTP port: 25
Sendmail_from:
-------------------------------------------------------------------------------------------
Strange, SMTP was defined before ????, and it still won't echo.
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
      Both

error_reporting(E_ALL);
ini_set( sendmail_from, "<sendmailfrom>@<localhost>" );
echo "SMTP host: " . ini_get("smtp");
echo "SMTP port: " . ini_get("smtp_port");
echo "Sendmail From: " . ini_get("sendmail_from");
$return = mail('<another user>@<localhost>', 'Test', 'Test');
var_dump($return);

     and

error_reporting(E_ALL);
ini_set( sendmail_from, "<sendmailfrom>@<localhost>" );
ini_set( smtp, "localhost" );
echo "SMTP host: " . ini_get("smtp");
echo "SMTP port: " . ini_get("smtp_port");
echo "Sendmail From: " . ini_get("sendmail_from");
$return = mail('<another user>@<localhost>', 'Test', 'Test');
var_dump($return);

     return

no other errors

SMTP host:
SMTP port: 25
Sendmail_from: <sendmailfrom>@<localhost>

and

bool(true)

Yet NO EMAIL is ever received/returned at the local email address or when outside email addresses are used, and never when mail() is seemingly successfully used in a script.

WHY can't I echo the SMTP address being USED? What am I doing wrong? (Please note that phpinfo IS DISABLED ON MY SERVER BECAUSE IT IS A SECURITY THREAT)

How am I going to get this emailing straightened out?


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux