...PHP Form...
Posted by: sftaa (58.27.192.---)
Date: October 31, 2007 06:16AM

i have installed WAMPSERVER & made a form using PHP when i submit form i always got following message.

(Warning: mail()function: Failed to connect to mailserver at "localhost" port 25, verfiy your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\forms\sendmail.php on line 6).

kindly help me out how i can resolve above metioned issues.

Regards,
Faisal

Options: ReplyQuote
Re: ...PHP Form...
Posted by: toivo (203.19.130.---)
Date: October 31, 2007 06:36AM

Hi,

As the error message suggests, you may not have an SMTP server running in your WAMP server which would respond to requests sent to TCP port 25. You need to find out the IP address of a mail server to which your WAMP server can send the SMTP messages and edit your php.ini configuration file at c:\wamp\Apache2\bin.

Look for the lines:

[mail function]
; For Win32 only.
SMTP = nnn.nnn.nnn.nnn

and replace nnn.nnn.nnn.nnn with the IP address of your mail server. It may perhaps be the mail server of your ISP.

Regards,



toivo
Sydney, Australia

Options: ReplyQuote
Re: ...PHP Form...
Posted by: sftaa (58.27.192.---)
Date: October 31, 2007 07:31AM

thanks for your prompt response i have set following settings

smtp =localhot;
smtp_port = 25;

but still that in not wokring

Options: ReplyQuote
Re: ...PHP Form...
Posted by: toivo (---.nsw.bigpond.net.au)
Date: October 31, 2007 08:50AM

Hi,

Do you really have an SMTP server running on the same physical server as your WAMP server? Usually in Windows environment the SMPT server is somewhere else, that is why the address of the SMTP server is in the php.ini file.

If you really have an SMTP server running and listening on your Windows box (which you can verify by going to the command prompt and typing in 'netstat -an' and looking for port 25, or by trying to connect to it: 'telnet localhost 25'), you need to make sure your antivirus software is not blocking connections to TCP port 25.

Find out the IP address of the SMTP server to which you normally send email messages from the LAN your WAMP server is connected to and use that address, as if you would be using a mail client like Outlook.

By the way, it is 'localhost', not 'localhot'.

Regards,



Post Edited (10-31-07 08:51)

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.