Want help about localhost mail

Asked By 0 points N/A Posted on -
qa-featured

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?

SHARE
Answered By 0 points N/A #89118

Want help about localhost mail

qa-featured

Hi, 

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 !!

Login/Register to Answer

Related Questions