Page 1 of 1

Failed to connect to mailserver

Posted: Mon Aug 07, 2006 5:12 pm
by irwin
Hi, I'm new to php. When I click "Confirm Order"on my 'practice' shopping cart I get this error

Code: Select all

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:\Program Files\xampp\htdocs\catalog\includes\classes\email.php on line 522

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\catalog\includes\classes\email.php:522) in C:\Program Files\xampp\htdocs\catalog\includes\functions\general.php on line 33
can someone help? Thanks.


hawleyjr | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Mon Aug 07, 2006 5:21 pm
by Chris Corbyn
Do you have an SMTP server running on that computer? You need to edit php.ini to tell it where your smtp server is ;)

Posted: Mon Aug 07, 2006 5:22 pm
by hawleyjr
The first error is saying you can't use the mail function because your mail server is not setup on your server or in your ini file. You can search this forum for alternative ways to send mail.

The second error message was created because the first error message outputted to the browser.