N/APosted on - 10/08/2011
Email is an important element for the modern world. I am in Localhost now and want to send mail to others but the mail cannot be sent. My site mailing system and net connection are ok.
Can’t I send mail from Localhost?
Want help about localhost mail
If you are working on localhost and you have set up a local server, WAMP in the case of Windows, sending email from localhost can be done this way : ( first ) you need to open the php.ini file in your server and make the following changes :
SMTP = smtp.you_service_provider
smtp_port = 25
so as you see, you need to provide your Internet service provider in the first entry. Next, you will need to restart your local server, and finally try sending mail using the PHP mail() function using the following syntax:
mail("[email protected]",test subject", "test body");
Hope this helps !!