PHP mail() not working

Avatar
  • updated
  • Answered
A colleague asked me to upload a simple PHP script to my server for testing. The script collects values from a form and works fine on his server but not on my inmotion server. Is there some global setting that would prevent this script?
Pinned replies
Avatar
jamesr
  • Answer
  • Answered

Thank you for your question gfoxapus!


I tested your script by removing the &_REQUEST's and filling in plain text variables. It appears the problem is with your form posting the info through teh browser. Below is an excerpt of what I used with the exception of the email address


Check your Form if its posting the variables. Please see the following article for more information on setting up a PHP email form.


How to create a custom PHP contact form


Using the PHP mail() Function to send emails from a form 


 Best regards,

James R

Avatar
jamesr
  • Answer
  • Answered

Thank you for your question gfoxapus!


I tested your script by removing the &_REQUEST's and filling in plain text variables. It appears the problem is with your form posting the info through teh browser. Below is an excerpt of what I used with the exception of the email address


Check your Form if its posting the variables. Please see the following article for more information on setting up a PHP email form.


How to create a custom PHP contact form


Using the PHP mail() Function to send emails from a form 


 Best regards,

James R