Connecting Tech Pros Worldwide Help | Site Map

php mail() function is not working

  #1  
Old May 19th, 2009, 05:20 AM
prabirchoudhury's Avatar
Familiar Sight
 
Join Date: May 2009
Location: Wellington, New Zealand
Posts: 152
mail() function stopped working after server upgraded to php 4.4.4. not getting any error on server error-log file and the php page . any idea please.


using mail function code

Expand|Select|Wrap|Line Numbers
  1. $to = "to@domain";
  2. $subject = "Test mail";
  3. $message = "Hello ! This is a simple email message frm fis server.";
  4. $message .= $contact;
  5. $from = "from@domain";
  6. $headers = "From: $from";
  7. mail($to,$subject,$message,$headers);
  8.  
  9.  
  10.  
  11.  
many thanks
  #2  
Old May 20th, 2009, 10:59 AM
Member
 
Join Date: May 2009
Posts: 81

re: php mail() function is not working


Try adding this to your script and test it:
error_reporting(E_ALL);
ini_set('display_errors', true);

You should also ensure your php.ini configuration is pointing to your mailer server.
Reply

Tags
mail function, mail(), php mail, php mail function


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP mail() function problem noha khalifa answers 12 November 18th, 2008 05:45 PM
PHP mail () function configuration shror answers 9 February 22nd, 2007 06:25 PM
mail problem (mail server is running) but mail() is not working. bilal answers 5 August 4th, 2006 04:09 AM
fnmatch() is not working ... Ruby Tuesdays answers 13 July 17th, 2005 05:14 AM