ram.mahaseth Posted August 3, 2009 Share Posted August 3, 2009 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 More sharing options...
gevans Posted August 3, 2009 Share Posted August 3, 2009 Try testing the mail; <?php if(mail(your details)) { echo 'sent'; } else { echo 'not sent'; } Link to comment https://forums.phpfreaks.com/topic/168653-php-mail-not-working/#findComment-889810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.