Hi, I am studying a php text book and it requires me to use the mail() function. However, there is no indication of how to achieve this. Please give me some subjection as to what I need to do. Such as, whether I need to setup a mailing server? or install a specific program? or configure my php.ini?

Any help would be appreciated! Thank you!

you cannot test mail on your localhost try it from a free web server, like www.111mb.net

you cannot test mail on your localhost try it from a free web server, like www.111mb.net

That is totally wrong and you don't even need internet to test email scripts with php. All of the answers to this topic can be found on a search term such as 'xampp'. xampp is a program that allows you to setup a localhost website (not online but through the browser offline). It contains the following features:

  • php server-side language Viewable through a browser
  • A server email program which acts as a server
  • An uploader that basically just copies the files into the htdocs folder
  • The ability to use Mysql Databases

The second option which I assume you have started is to find each of the server programs individually but I would recommend xampp if and only if your computer is not connected to the internet due to security issues. So check out the link below for xampp as I use it myself for developing websites offline:
http://www.apachefriends.org/en/xampp-windows.html

If however you want to keep doing what you are already doing then you can download the one component of the xampp software at the below link and where-ever a domain name is asked, just place localhost. There are other local domains you can make but those are the basics. So a download link for the email server program on its own is located at: http://www.snapfiles.com/get/mercury.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.