itpvision Posted May 29, 2008 Share Posted May 29, 2008 Hello, I am trying to send email from a php script on my local pc, i am still developing the site on my local computer, and not still testing online The php.ini has the followinf settings: -------------------------- [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. sendmail_from = localhost ----------------------- I also have added this line in my php script: ini_set ("sendmail_from",localhost); While trying to send a mail I get the following 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() Any Help appreciated Regards Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/107775-fail-to-send-email-locally-in-a-php-script/ Share on other sites More sharing options...
Daniel0 Posted May 29, 2008 Share Posted May 29, 2008 You need to run an SMTP server on your localhost in order to use it. Quote Link to comment https://forums.phpfreaks.com/topic/107775-fail-to-send-email-locally-in-a-php-script/#findComment-552454 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.