I’m going through a tutorial about processing php forms and something puzzles me and its this. Whils i can nearly do a php script for a form how do make sure the content of the form arrives in a designated eMail address?
I noticed on a php script for a form has this in the beginning of the php script…
ini_set(“sendmail_from”, “user@yourdomain.com”);
The function works with no trouble on hosted sites that offer basic php and mail services. Somehow the function, which executes on your host’s servers, interfaces with your host’s SendMail (or whatever they use). You may not even have to set the “from” address if your host has done that for you already.
However, if you’re running php on your own computer, the function won’t work because you don’t have a mail server also running, and if you did, your host probably doesn’t let you use port 25.