Failed to connect to mail server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
grace01
Forum Newbie
Posts: 5
Joined: Wed Sep 05, 2007 3:43 am

Failed to connect to mail server

Post by grace01 »

My php program can send mail on php 5. But some of other php programs cannot work on php 5, so I switch to php 4. Now my php program cannot send mail. I use remote smpt server to send mail. I got 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 htmlMimeMail.php on line 670. Actually I already configured use remote smtp server not localhost. Why php5 can detect my setting in htmlMimeMail.php but php 4 cannot? What should I do?

My server os is windows.

Thanks

Grace
kertz
Forum Newbie
Posts: 17
Joined: Sat Sep 15, 2007 2:34 am
Location: India

Post by kertz »

Whats your exact version of php? The smtp_port is only available since version 4.3.0

check http://www.php.net/manual/en/ref.mail.php for details...
Post Reply