I updated to run PHP 5.16 on Apache 2.0.54
I used to get the mail function to work under php 4 using the following in the PHP.ini file:
[mail function]
; For Win32 only.
SMTP = mail.xyz.net
; For Win32 only.
sendmail_from = myacctname@xyz.net
Now when I try to process a feedback form that was working under PHP4 I am getting the following warning/error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Documents and Settings\RLane\My Documents\Web Sites\Localhost\InDevelopment\Wellington\Source\04\processfeedback.php on line 14
The code in processfeedback.php is as follows:
//create short variable names
$name=$_POST['name'];
$email=$_POST['email'];
$feedback=$_POST['feedback'];
$toaddress = 'myacctname@xyz.net';
$subject = 'Feedback from web site';
$mailcontent = 'Customer name: '.$name."\r\n"
.'Customer email: '.$email."\r\n"
."Customer comments: \r\n".$feedback."\r\n";
$fromaddress = 'From: myacctname@xyz.net';
mail($toaddress, $subject, $mailcontent, $fromaddress);
Any ideas what I need to modify to make it work?