yehuda54 Posted July 6, 2006 Share Posted July 6, 2006 I installed PHP 5 on my windows xp successuly. However, when I try to send out mail with the mail(), I recieve the following error: [quote]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()[/quote] My mail settings in my php.ini file is configured like this: [quote][mail function] ; For Win32 only. SMTP = localhost ; for Win32 only smtp_port = 25 ; For Win32 only. sendmail_from = [email protected][/quote] Someone advise me to test if I can connect to telnet localhost 25 -- the connection failed. I am not sure what that indicates. I tried to shut off the windows firewall and then try to use the mail(), but it still did not work. If someone can please tell me how to get SMTP working? Quote Link to comment https://forums.phpfreaks.com/topic/13903-how-to-get-smtp-working-on-php-5-in-windows-xp/ Share on other sites More sharing options...
wildteen88 Posted July 7, 2006 Share Posted July 7, 2006 You need to use an SMTP server in order for emails to be sent, Windows doesnt have an SMTP server installed so you cant send emails. I use my ISPs SMTP server for testing my scripts when using the mail function. See if you can use your ISPs SMTP server.In order to setup PHP to use an SMTP server you to change [b]SMTP = localhost[/b] to [b]SMTP = SMTPAddress[/b]The SMTPAddress is usually something like this smtp.hostname.comNOTE: You cant use SMTP servers that require authentication in order emails to be sent.If you dont know any SMTP servers then there is a free SMTP Server software out there but I dont knwo the name of it. Quote Link to comment https://forums.phpfreaks.com/topic/13903-how-to-get-smtp-working-on-php-5-in-windows-xp/#findComment-54289 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.