I am trying to use some ajax to send some email. I have done this before using cold fusion and had no issue.
What I am running into is that localhost
Based on the error message you provided and the obscurity of the URL you are navigating to on localhost, I suspect the root cause of your issue stems from having two different document roots set up on your development server and production server.
If I'm right, this can be fixed by changing your development server's document root from C://xampp/htdocs/
to C://xampp/htdocs/3H-Web-Wlements/
. With this set, the server will attempt to serve index.php
from 3H-Web-Wlements/
instead of from htdocs/
.
The document root setting can be set within Apache's configuration file typically called httpd.conf
. If you're using a development setup like XAMPP or MAMP, you likely have a button in the control panel to get to httpd.conf.
The setting should look like this after the change:
DocumentRoot C://xampp/htdocs/3H-Web-Wlements/
After making the change, you will need to restart your web server for the changes to take effect.
Sending email functions on php is much better to test on active server than localhost because localhost needs to configure to support email functions while active server is already set up for this. I also experienced it.