Hi, I''m trying to learn how to send emails to registered users with php mail function. Been online a lot and getting confused. I was wondering if anyone could explain how the set up is done and what is needed to accomplish this task. Any input on this topic would be appreciated.
if (mail($to, $subject, $message, "From:$from"))
echo 'sent mail!';
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in
Just read your post on passwords. I think that answer to your problem was correct. You don't have a mail server on your localhost. Or it's not set up correctly. Can you test this on an external server?
Although you can probably find a book on this. I hate to see you incur the expense when it's really a very simple procedure. You can probably get all of this help from the technical aid at the hosting company, which is very little. First you need to find the ftp (file transfer protical) in the host companie's website. Then you upload your files into the root directory. You can make sub directories in that root directory just like you would on your hard drive at home. But of course make sure there's an index.php file in the root directory so everyone can't see all of your code. That's pretty much it.
If you don't like the hosting companie's ftp you can always find some free versions out there by doing a Google search. I personally like coffee cup.
I hope this helps,
PS - any major hosting company will have the PHP mail turned on. If not then you need to ask them to do so for you