Jump to content

Trouble with forms - Failed to connect to mailserver at "localhost"


pete

Recommended Posts

Stefan, first I'd like to say as other have thanks for the effort and content you have on killerphp.com. I try to find something new to learn over my office winter shutdown and this year I set out to learn PHP and was lucky to stumble upon you site.

 

Anyhow, my question is in regards to setting up my localhost (machine) for submitting forms. I've installed WAMP and the site is functioning as expected with the exception I'm getting the message below when I try to submit a sample form( replicated the one in forms video). I realize of I don't have a mail server. but I don't understand the what the need for one is for processing a form. I've search the net and found all sorts of unclear answers. - Thanks Pete

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:\wamp\www\forms\forms.php

Link to comment
Share on other sites

Thanks for moving the post. :)

 

OK... Usually I would suggest trying to avoid using the mail() function from your local machine. Anything that deals with mail() I usually test on my hosting account.

 

That said... it should be possible to get it up and running, it's just a matter of editing the php.ini file. Basically, you need to adjust the SMTP setting in the php.ini file. Here is an article that should help with that:

 

http://www.sitepoint.com/article/advanced-email-php/

 

Take a look at the PHP Email Setup section.

Link to comment
Share on other sites

I realize of I don't have a mail server. but I don't understand the what the need for one is for processing a form. I've search the net and found all sorts of unclear answers.

 

Just to clarify, you need to have a mail server to send messages -- that's just the way it works. You do have a mail server -- it's whatever your internet access gives you, the SMTP that you enter if you use Outlook, Thunderbird , Apple's Mail, etc.

 

For example, since I am hosted through Cox Communications, they assign me a SMTP, which is "smtp.west.cox.net". What SMTP you have will depend on the company you use for internet access.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...