simpson_121919 Posted March 1, 2011 Share Posted March 1, 2011 I came across this error when trying to learn how to send form data to my email address - 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:\Apache\htdocs\websites\php_learn\report.php on line 30 From what I have read so far I think I need to reconfig my php.ini file. So I looked into my php.ini file and found this - [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com I have a 64 bit system so do I need to download another version of php? Also when I do get to the point at where I can config the php.ini file how do I go about it? Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 1, 2011 Share Posted March 1, 2011 Did you install a mail server? Quote Link to comment Share on other sites More sharing options...
simpson_121919 Posted March 1, 2011 Author Share Posted March 1, 2011 I did not. I just assumed that it was part of the apache server software. Im doing all the testing of my php scripts on my local computer so what would be the best way to go about solving the mail server problem. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 1, 2011 Share Posted March 1, 2011 No, it is not part of Apache. You'd need to install one, use an external mail server that does not require authentication, or make use of a mail class such as PHPMailer or PEAR:Mail. Quote Link to comment Share on other sites More sharing options...
simpson_121919 Posted March 1, 2011 Author Share Posted March 1, 2011 so if I install the phpmailer does it overide my [mail function] in php.ini or do I have to reconfigure that or does the phpmailer do it for me? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.