Php mail() function is not working for me

From: Date: Tue, 02 Jul 2002 15:56:34 +0000
Subject: Php mail() function is not working for me
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104946@lists.php.net to get a copy of this message
Hi friend, I am getting the following problem from last 6 months..still I couldn't solve this problem. >>Warning: Failed to Connect in c:\www\imac\email.php on line 18 >>Warning: Failed to Connect in c:\www\imac\email.php on line 22 Email.php ============ <?php //BE SURE TO CHANGE THE 3 LINES BELOW TO USE YOUR OWN //ADDRESS, NAME and DATA FILENAME //THE DATA FILE MUST ALREADY EXIST AND BE WORLD WRITEABLE $webweaver = "balaji.ankem@wipro.com"; $wwname = "Balaji Ankem"; $filename = "visitors.dat"; if (file_exists ($filename)) { $user_name="Ramesh"; $user_mail="ramesh.ottikunta@wipro.com"; mail($webweaver,"Visitor to PHP Example Form page", "$user_name <$user_mail> just visited your site and submitted the form at www.auburn.edu/helpdesk/php/form.html.", "From: $user_name <$user_mail>"); mail($user_mail,"Thanks for visiting","Dear $user_name,\n We appreciate your visit.\n\n$wwname\n<$webweaver>", "From: $wwname <$webweaver>"); echo "<p>Your name: <b>$user_name</b><br> and e-mail address: <b>$user_mail</b><br> have been sent to the webweaver, <b>$wwname</b>, and a response has been e-mailed to you.<p> Not only that, you've been added to our records!</p>"; // record the visitor info $user_info = $user_name . " - " . $user_mail . "\n"; // open the file in append mode $handle = fopen ($filename,'a+'); fputs($handle,$user_info); //close the file fclose($handle); } else { echo "<b>The file $filename does not exist and needs to be created for this to work.</b>"; } ?> ====================== Thanks and Regards Balaji

**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************
« previous php.general (#104946) next »