Jump to content

Need help with mail function


gautham

Recommended Posts

Hi everyone,

I am a beginner. I had tried sending a mail from wamp server. But this message appeared.

 

"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:\wamp\www\book\mailform.php on line 13

Thank you for using our mail form "

 

 

What port number should I set in php.ini now?

Link to comment
Share on other sites

In order to use localhost you would have to install a mail server on your computer, you would then set the port to whatever port you set your mail server to listen to. It's more likely you don't want to do this, in which case you will need to change the SMTP value and stick to the standard port 25. I know in the UK many ISPs allow you to use their SMTP.

Link to comment
Share on other sites

check this in ur command prompt

telnet localhost 25

 

 

if the port is open then it will allow you to send the mail. other wise the only other option left for you is to use the smtp server to send mails..

u can configure the smtp in the php.ini file

 

check this article for your reference

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.