Jump to content

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()

Recommended Posts

Well am trying to send mail using php mail function. but every time it shows

 "[size="1"]mail() [[url="http://localhost/phptest/function.mail"]function.mail[/url]]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()[/size]" 

such error. When i cheked my php.ini file in C:\wamp\bin\apache\Apache2.2.17\bin\php.ini it shows

SMTP = localhostsmtp_port = 25sendmail_from = santosh_shah777@yahoo.commail.add_x_header = On

Well am new to it i try to configure it but i cant able to solve this on my own. Any help will be greatly appreciated .

Link to post
Share on other sites

do you have a mailserver on your local machine? Is this your personal computer or on a server? SMTP servers aren't just automatically present on your typical laptop/PC.

Link to post
Share on other sites

yea this is my personal computer. i dont think i have mail server in my localhost. How to install mail server in my wamp any idea.?

Link to post
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.

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.

  • Create New...