How o I get a PHP Form mail script to work?
I have recently created a PHP form mailer for my webpage. Useing the mail() function. The problem is that it wont send the email to my account. SO instead I have to use a bravenet.com script.
I was wondering whether somone could tell me how to get a PHP script to work, when my server runs other PHP scripts as well
August 24, 2010 | Filed Under Scripts FAQs
Comments
3 Responses to “How o I get a PHP Form mail script to work?”
Powered by Yahoo! Answers
The PHP mail() function has to be enabled at the server in order to work. Check with your ISP to see if the function works on your webhosting account, or if they have something else you can use. Some ISPs disable or restrict mail sending capabilities to prevent misuse by spammers.
You must make sure that the script is also uploaded to your folders on your server.
For mail() function to work, SMTP must be configured on the server. If SMTP is running, use
mail($strTo, $strSubject, $strMessage, "From: From email address");
If you want to send HTML mails, or the mails containing attachment, you will have to alter the 4th parameter in mail function.