Email Form
Author: Bernard L.
Visited 3217,
Followers 2,
Shared 37
There's a "bug" when one creates an email form, the form action calls action="mail/imEmailForm.php"
So it results in a http://www.viandesg.com/mail/imEmailForm.php
on my server, /mail is a shortcut for a webmail application and therefore the action result in a "Page not found" message as the imEmailForm.php file does not exist in the mail folder of my server. To me the action should be relative to the html docs. See the picture with my server tree.
Posted on the
Author
A workaround until someone comes with an other answer:
rename the mail/imEmailForm.php
to email/imEmailForm.php
Open the html file where you have your contact form and in the form action, change the
action="mail/imEmailForm.php"
to
action="email/imEmailForm.php"
Hello Bernard,
Alternativelyyou could try tocreate atop level folderto the folder"html"and exportall your projectinone new folder level. In this mode you have the path on /var/www/html/newfolder/mail/ and mail is not a folder of webmail.
Author
Thank you but that won't work. "/mail" is global shortcut to the webmail application, just typewww.viandesg.com/mailand you will see. This shortcut is on all my websites hosted on Jumpline and the tech support say that they won't/can't change it as it is in the apache setup.
Hello Bernard,
if you upload your website on the path /var/www/html/newfolder/mail/ the web application is on the top folder and you can insert as URL in your browser:
http://www.viandesg.com/newfolder/index.html
So you don't access to application of webmail but at your website exported: http://www.viandesg.com/newfolder/index.html
Have you try so?
Author
Does not wort either.
my site is in: /var/www/html
therefore the mail is in /var/www/html/mail
the webmail application is in: /usr/webapps/webmail
so there should not be any problem but on the server, there is a folder called mail that is located at: /var/spool/mail
so whenever someone types or request through a script something inside the /mail folder, the server defaults to te above and issues a 404
Hello Bernard,
We cannotchange theexport folderwith anothername becausethe problemcould happen inany case for another web server.Iunderstandthat yourproviderhas set upa linkthat redirectsmailapplication on path /usr/webapps/webmail/.It is possibleby the server thatmanagesyour web spacetochange thislink butyou should contact theserver administratorto make thesechanges.
Author
Thank you for your help, I will edit the html page every time I upload the site to match a new folder I created and where I put the php script that sends the mail.