newbie: no mail() is sent

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have created a test page on which I send test email using mail() function.
The problem is that although I receive 1 as result of mail(), no email is
Here is main part of the code:

        $toadress = '';
        $subject = 'Test';
        $message = 'To jest test.' .
        $headers = "MIME-Version: 1.0\r\nContent-type: text/html;
        $sent = mail($toadress, $subject, $message, $headers);

After call, $sent === 1.
I use Fedora 8 Linux and PHP5.
Here is part of /etc/php.ini:

        SMTP = localhost
        smtp_port = 25
        sendmail_path = /usr/sbin/sendmail -t -i

I have sendmail installed.
Could you help me please?

Re: newbie: no mail() is sent


Do you have any errors you can see in /var/log/maillog or /var/log/
mail.log? Maybe try an alternate destination address... Having
error_reporting(E_ALL) may show some notices.

Not sure if you have a typo, but line 3 should have a semicolon at the
end of the line instead of a dot.


John Peters

Quoted text here. Click to load it

Site Timeline