Hey everyone,

I was doing a search on good tutorials on how to use the mail function. I thought it would be as easy as what PHP api tells me how to use it. I stored the value of mail() in a variable if the variable is true then I will get a message saying "success". Otherwise, a "fail" message will be given.

I get the success message displayed and get a warning as well about the port 25 and smtp.gmail.com. I suppose since it is just a warning, it isn't going to affect anything because the value of mail() is true which means it successfuly gets through. But unfortunately, I don't receive any Email.

Does anyone know how to send Emails using localhost and Gmail account without installing any Mail Client? or Just sending dummy emails?


4 Years
Discussion Span
Last Post by rotten69

If its just your computer or you are in network
You must know ip/domain name of SMTP server in your network

open php.ini file

[mail function]
SMTP = xxx.xxx.xxx.xxx (YOUR smtp ip like)
smtp_port = 25

now your php ini should look like this somewhere

restrat apache service

echo mail (......);

on success it will return 1 else nothing, if success you will receive mail within few seconds

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.