1

Now I'm trying to test a registration form on my computer I have PHP & Mysql and wampserver installed on my windows vista computer but when I try submiting the registration form I get the following error.

Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() 

I know to go the php.ini file but what do I add and where is it where I added it to is it here below.




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

; For Win32 only.
;sendmail_from = [email protected]

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

[SQL]

1
  • check this link to send mail from localhost. Commented Sep 19, 2009 at 13:22

1 Answer 1

3

You must have an Sendmail-like SMTP server running on your computer so you can send through localhost. I would recomment to change the SMTP variable to your ISP's SMTP server.

Regards, Kristinn.

Sign up to request clarification or add additional context in comments.

1 Comment

You would have to change the SMTP variable in php.ini (which you pasted above) to the host of your ISP's SMTP server and after that restart the WAMP service. I don't know the host of your ISP's server but it's normally the one you use to send normal email through. If you've got an email address at your ISP then you should be able to use the SMTP server you use when you're sending email from your email address. I hope this helps. I wish I would have a connection with the same ISP because then I would be able to tell you the exact SMTP host. :-) You can also call your ISP to get the address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.