Page 1 of 1

Error message when using php form on XAMPP

PostPosted: 01. February 2006 17:06
by lcaselyhayford
Hi All,

I keep getting this error message when I test my php script on XAMPP. I have a simple contact form on my web page through which I want to enter and submit messages to an email address.

However I keep getting this error message.

Does anyone have any ideas please?


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() in C:\www\form \contact.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at C:\www\form \contact.php:236) in C:\www\form \contact.php on line 249


Unquote

Thanks

PostPosted: 01. February 2006 17:09
by alucard01
you have failed to specify a valid SMTP in your php.ini...please read the php.ini under apache\bin for more information.

Hope it helps.

PostPosted: 02. February 2006 09:45
by lcaselyhayford
Hi,

Thanks for the reply I shall have a look at the php.ini

Thanks

:)

PostPosted: 02. February 2006 11:15
by lcaselyhayford
Hi,

Could you please let me know how to specify a valid SMTP in the php.ini?

This is what the SMTP looks like at the moment in my php.ini file.

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

Any Ideas?

Thanks

PostPosted: 02. February 2006 16:59
by alucard01
Well, this error msg tell that, your system cannot send out email using localhost with port 25.

So, have you set up a mail server in your local machine? e.g. mecury... A mail server can deliver mail to your client.

PostPosted: 02. February 2006 17:03
by lcaselyhayford
Ahh ok...

I will try that.

Thanks