Jump to content

php mail() not working !!!!!!


ram.mahaseth

Recommended Posts

Hello there,

I've been trying to use mail function to email but it is not working when i call it from script.It parses without error and displays phpinfo() page.But I couldnot see any email in my inbox.

This is my php code to email.

 

<?php

 

mail('[email protected]','testingfrom php','hello');

phpinfo();

 

?>

 

It delivers email when I call it from terminal by

 

[root@localhost usr]# /usr/sbin/sendmail.postfix -t < test.txt

 

Where test.txt contains,

From: [email protected]

To: [email protected]

Subject: Test message

<h1>This is a test message from terminal using postfix</h1>

 

I have installed xampp server on my Redhat5 also using postfix as my mail server.

Please help me out here.

 

Link to comment
https://forums.phpfreaks.com/topic/168653-php-mail-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.